class EmbeddedChannel extends AbstractChannel
| Modifier and Type | Field and Description |
|---|---|
private ChannelConfig |
config |
private static java.lang.Integer |
DUMMY_ID |
private java.net.SocketAddress |
localAddress |
private java.net.SocketAddress |
remoteAddress |
OP_NONE, OP_READ, OP_READ_WRITE, OP_WRITE| Constructor and Description |
|---|
EmbeddedChannel(ChannelPipeline pipeline,
ChannelSink sink) |
| Modifier and Type | Method and Description |
|---|---|
ChannelConfig |
getConfig()
Returns the configuration of this channel.
|
java.net.SocketAddress |
getLocalAddress()
Returns the local address where this channel is bound to.
|
java.net.SocketAddress |
getRemoteAddress()
Returns the remote address where this channel is connected to.
|
boolean |
isBound()
Returns
true if and only if this channel is bound to a
local address. |
boolean |
isConnected()
Returns
true if and only if this channel is connected to a
remote address. |
bind, close, compareTo, connect, disconnect, equals, getAttachment, getCloseFuture, getFactory, getId, getInterestOps, getInternalInterestOps, getParent, getPipeline, getSucceededFuture, getUnsupportedOperationFuture, getUserDefinedWritability, hashCode, isOpen, isReadable, isWritable, setAttachment, setClosed, setInterestOps, setInternalInterestOps, setReadable, setUnwritable, setUserDefinedWritability, setWritable, toString, unbind, write, writeprivate static final java.lang.Integer DUMMY_ID
private final ChannelConfig config
private final java.net.SocketAddress localAddress
private final java.net.SocketAddress remoteAddress
EmbeddedChannel(ChannelPipeline pipeline, ChannelSink sink)
public ChannelConfig getConfig()
Channelpublic java.net.SocketAddress getLocalAddress()
ChannelSocketAddress is supposed to be down-cast into more concrete
type such as InetSocketAddress to retrieve the detailed
information.null if this channel is not bound.public java.net.SocketAddress getRemoteAddress()
ChannelSocketAddress is supposed to be down-cast into more
concrete type such as InetSocketAddress to retrieve the detailed
information.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.public boolean isBound()
Channeltrue if and only if this channel is bound to a
local address.public boolean isConnected()
Channeltrue if and only if this channel is connected to a
remote address.