Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8818237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:03:50+00:00 2026-06-14T05:03:50+00:00

Netty channels have multiple states but I am unable to find any documentation on

  • 0

Netty channels have multiple states but I am unable to find any
documentation on the actual state transitions. The closest to any
documentation on this that I could find for Netty 3.2.x system is
here.

I was able to locate the possible states that a channel can be in
here.

However there is nothing that describes the normal transitions that a
channel can make from one state to another. It appears that not all
channels make all possible state transitions.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T05:03:51+00:00Added an answer on June 14, 2026 at 5:03 am

    Different Netty channels do indeed have different state transitions.

    In general the possible state transitions for TCP based server
    channels are:

    OPEN -> ( BOUND -> UNBOUND )* -> CLOSE
    

    If you are using a SimpleChannelHandler subclass in your pipeline
    the equivalent methods for handling the upstream events when one of
    these state changes occur are:

    channelOpen
    channelBound
    channelUnbound
    channelClose
    

    Server channels never move into the CONNECTED state.

    Server channels rarely move back into the BOUND state once they
    move into the UNBOUND state, however this appears to be dependent
    on the application so YMMV.

    Note that server channels can fire events when a child channel is
    opened or closed. These events can occur only after the server
    channel is in the BOUND state. When these events are sent
    upstream on behalf of the server channel then the following methods on
    your SimpleChannelHandler subclass are called:

    childChannelOpen
    childChannelClosed
    

    The possible state transitions for TCP based child and client channels
    are:

    OPEN -> ( BOUND -> ( CONNECTED -> DISCONNECTED )* -> UNBOUND )* -> CLOSE
    

    It appears that moving into the CONNECTED state first is not
    enforced within the channel code; however this state is invariably
    fired first for both child and client channels within the Netty
    framework before the channel is moved into the CONNECTED state.

    If you are using SimpleChannelHandler or a subclass thereof in
    your pipeline the equivalent methods are:

    channelOpen
    channelBound
    channelConnected
    channelDisconnected
    channelUnbound
    channelClose
    

    A TCP based channel must be in the CONNECTED state before anything
    can be read or written to the channel. This includes server channels,
    which can never be read from or written to, which is not much of a
    surprise as server channels are invariably used only for managing the
    connect operation on behalf of the server.

    Datagram sockets operate differently than TCP based sockets in that
    they can be used to read and write data without actually being
    connected (though connecting a datagram socket can be faster as you
    avoid security checks). Datagram sockets can be effectively used
    using both of the state transitions listed for TCP based child and
    server channels described above.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a netty pipeline such as: return Channels.pipeline( new ObjectEncoder(), new ObjectDecoder(), new
I have a TCP based Netty application with multiple clients that need to communicate
I have been studying Netty and Mina but am confused as to the best
Does netty have built-in support for this somehow? If it doesn't have, where should
Netty defines two methods for channels: isOpen() and isConnected(), but the Javadoc does not
I`m trying to test netty, but when i creating a multiple clients to connect
I have the following simple code in my netty project, it expects to read
I have a network server that was implemented using Jboss Netty. It servers the
I have a camel instance with a Netty endpoint that consolidates many incoming requests
In Netty if I create multiple ConnectionlessBootstrap instances and then set the ChannelPipeline on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.