Class EmbeddedChannel

java.lang.Object
org.jboss.netty.channel.AbstractChannel
org.jboss.netty.handler.codec.embedder.EmbeddedChannel
All Implemented Interfaces:
Comparable<Channel>, Channel

class EmbeddedChannel extends AbstractChannel
TODO Make EmbeddedChannel implement ChannelConfig and ChannelSink to reduce overhead. TODO Do not extend AbstractChannel to reduce overhead and remove the internal-use-only constructor in AbstractChannel.
  • Field Details

  • Constructor Details

  • Method Details

    • getConfig

      public ChannelConfig getConfig()
      Description copied from interface: Channel
      Returns the configuration of this channel.
    • getLocalAddress

      public SocketAddress getLocalAddress()
      Description copied from interface: Channel
      Returns the local address where this channel is bound to. The returned SocketAddress is supposed to be down-cast into more concrete type such as InetSocketAddress to retrieve the detailed information.
      Returns:
      the local address of this channel. null if this channel is not bound.
    • getRemoteAddress

      public SocketAddress getRemoteAddress()
      Description copied from interface: Channel
      Returns the remote address where this channel is connected to. The returned SocketAddress is supposed to be down-cast into more concrete type such as InetSocketAddress to retrieve the detailed information.
      Returns:
      the remote address of this channel. null if this channel is not connected. If this channel is not connected but it can receive messages from arbitrary remote addresses (e.g. DatagramChannel, use MessageEvent.getRemoteAddress() to determine the origination of the received message as this method will return null.
    • isBound

      public boolean isBound()
      Description copied from interface: Channel
      Returns true if and only if this channel is bound to a local address.
    • isConnected

      public boolean isConnected()
      Description copied from interface: Channel
      Returns true if and only if this channel is connected to a remote address.