@UnstableApi public final class KQueueServerSocketChannel extends AbstractKQueueServerChannel implements ServerSocketChannel
AbstractKQueueServerChannel.KQueueServerSocketUnsafe
AbstractKQueueChannel.AbstractKQueueUnsafe
AbstractChannel.AbstractUnsafe
Channel.Unsafe
Modifier and Type | Field and Description |
---|---|
private KQueueServerSocketChannelConfig |
config |
private java.net.InetSocketAddress |
local |
active, inputClosedSeenErrorOnRead, jniSelfPtr, readReadyRunnablePending, socket
Constructor and Description |
---|
KQueueServerSocketChannel() |
KQueueServerSocketChannel(BsdSocket fd) |
KQueueServerSocketChannel(BsdSocket fd,
boolean active) |
KQueueServerSocketChannel(int fd) |
Modifier and Type | Method and Description |
---|---|
KQueueServerSocketChannelConfig |
config()
Returns the configuration of this channel.
|
protected void |
doBind(java.net.SocketAddress localAddress)
Bind the
Channel to the SocketAddress |
protected boolean |
isCompatible(EventLoop loop)
Return
true if the given EventLoop is compatible with this instance. |
java.net.InetSocketAddress |
localAddress()
Returns the local address where this channel is bound to.
|
protected java.net.InetSocketAddress |
localAddress0()
Returns the
SocketAddress which is bound locally. |
protected Channel |
newChildChannel(int fd,
byte[] address,
int offset,
int len) |
java.net.InetSocketAddress |
remoteAddress()
Returns the remote address where this channel is connected to.
|
doWrite, filterOutboundMessage, metadata, newUnsafe, remoteAddress0
checkResolvable, clearReadFilter, doBeginRead, doClose, doDeregister, doDisconnect, doReadBytes, doRegister, doWriteBytes, fd, isActive, isAllowHalfClosure, isOpen, isSoErrorZero, newDirectBuffer, newDirectBuffer, readFilter, shouldBreakReadReady, writeFilter
alloc, bind, bind, bytesBeforeUnwritable, bytesBeforeWritable, close, close, closeFuture, compareTo, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, equals, eventLoop, flush, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, isWritable, newChannelPipeline, newFailedFuture, newId, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, toString, unsafe, voidPromise, write, write, writeAndFlush, writeAndFlush
attr, hasAttr
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
alloc, bytesBeforeUnwritable, bytesBeforeWritable, closeFuture, eventLoop, flush, id, isActive, isOpen, isRegistered, isWritable, metadata, parent, pipeline, read, unsafe
attr, hasAttr
bind, bind, close, close, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, voidPromise, write, write, writeAndFlush, writeAndFlush
private final KQueueServerSocketChannelConfig config
private volatile java.net.InetSocketAddress local
public KQueueServerSocketChannel()
public KQueueServerSocketChannel(int fd)
KQueueServerSocketChannel(BsdSocket fd)
KQueueServerSocketChannel(BsdSocket fd, boolean active)
protected boolean isCompatible(EventLoop loop)
AbstractChannel
true
if the given EventLoop
is compatible with this instance.isCompatible
in class AbstractKQueueServerChannel
protected void doBind(java.net.SocketAddress localAddress) throws java.lang.Exception
AbstractChannel
Channel
to the SocketAddress
doBind
in class AbstractChannel
java.lang.Exception
public java.net.InetSocketAddress remoteAddress()
Channel
SocketAddress
is supposed to be down-cast into more
concrete type such as InetSocketAddress
to retrieve the detailed
information.remoteAddress
in interface Channel
remoteAddress
in interface ServerSocketChannel
remoteAddress
in class AbstractChannel
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 DefaultAddressedEnvelope.recipient()
to determine
the origination of the received message as this method will
return null
.public java.net.InetSocketAddress localAddress()
Channel
SocketAddress
is supposed to be down-cast into more concrete
type such as InetSocketAddress
to retrieve the detailed
information.localAddress
in interface Channel
localAddress
in interface ServerSocketChannel
localAddress
in class AbstractChannel
null
if this channel is not bound.public KQueueServerSocketChannelConfig config()
Channel
config
in interface Channel
config
in interface ServerSocketChannel
config
in class AbstractKQueueChannel
protected java.net.InetSocketAddress localAddress0()
AbstractChannel
SocketAddress
which is bound locally.localAddress0
in class AbstractChannel
protected Channel newChildChannel(int fd, byte[] address, int offset, int len) throws java.lang.Exception
newChildChannel
in class AbstractKQueueServerChannel
java.lang.Exception