@UnstableApi public final class KQueueSocketChannel extends AbstractKQueueStreamChannel implements SocketChannel
| Modifier and Type | Class and Description |
|---|---|
private class |
KQueueSocketChannel.KQueueSocketChannelUnsafe |
AbstractKQueueStreamChannel.KQueueStreamUnsafeAbstractKQueueChannel.AbstractKQueueUnsafeAbstractChannel.AbstractUnsafeChannel.Unsafe| Modifier and Type | Field and Description |
|---|---|
private KQueueSocketChannelConfig |
config |
private java.net.InetSocketAddress |
local |
private java.net.InetSocketAddress |
remote |
private java.net.InetSocketAddress |
requestedRemote |
active, inputClosedSeenErrorOnRead, jniSelfPtr, readReadyRunnablePending, socket| Constructor and Description |
|---|
KQueueSocketChannel() |
KQueueSocketChannel(Channel parent,
BsdSocket fd,
java.net.InetSocketAddress remote) |
KQueueSocketChannel(int fd) |
| Modifier and Type | Method and Description |
|---|---|
private static java.net.InetSocketAddress |
computeRemoteAddr(java.net.InetSocketAddress remoteAddr,
java.net.InetSocketAddress osRemoteAddr) |
KQueueSocketChannelConfig |
config()
Returns the configuration of this channel.
|
protected void |
doBind(java.net.SocketAddress local)
Bind the
Channel to the SocketAddress |
protected boolean |
doConnect(java.net.SocketAddress remoteAddress,
java.net.SocketAddress localAddress)
Connect to the remote peer
|
java.net.InetSocketAddress |
localAddress()
Returns the local address where this channel is bound to.
|
protected java.net.SocketAddress |
localAddress0()
Returns the
SocketAddress which is bound locally. |
protected AbstractKQueueChannel.AbstractKQueueUnsafe |
newUnsafe()
Create a new
AbstractChannel.AbstractUnsafe instance which will be used for the life-time of the Channel |
ServerSocketChannel |
parent()
Returns the parent of this channel.
|
java.net.InetSocketAddress |
remoteAddress()
Returns the remote address where this channel is connected to.
|
protected java.net.SocketAddress |
remoteAddress0()
Return the
SocketAddress which the Channel is connected to. |
doClose, doWrite, doWriteSingle, filterOutboundMessage, isInputShutdown, isOutputShutdown, isShutdown, metadata, shutdown, shutdown, shutdownInput, shutdownInput, shutdownOutput, shutdownOutputcheckResolvable, clearReadFilter, doBeginRead, doDeregister, doDisconnect, doReadBytes, doRegister, doWriteBytes, fd, isActive, isAllowHalfClosure, isCompatible, isOpen, isSoErrorZero, newDirectBuffer, newDirectBuffer, readFilter, shouldBreakReadReady, writeFilteralloc, 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, pipeline, read, toString, unsafe, voidPromise, write, write, writeAndFlush, writeAndFlushattr, hasAttrclone, finalize, getClass, notify, notifyAll, wait, wait, waitisInputShutdown, isOutputShutdown, isShutdown, shutdown, shutdown, shutdownInput, shutdownInput, shutdownOutput, shutdownOutputalloc, bytesBeforeUnwritable, bytesBeforeWritable, closeFuture, eventLoop, flush, id, isActive, isOpen, isRegistered, isWritable, metadata, pipeline, read, unsafeattr, hasAttrbind, bind, close, close, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, voidPromise, write, write, writeAndFlush, writeAndFlushprivate final KQueueSocketChannelConfig config
private volatile java.net.InetSocketAddress local
private volatile java.net.InetSocketAddress remote
private java.net.InetSocketAddress requestedRemote
public KQueueSocketChannel()
public KQueueSocketChannel(int fd)
public java.net.InetSocketAddress remoteAddress()
ChannelSocketAddress is supposed to be down-cast into more
concrete type such as InetSocketAddress to retrieve the detailed
information.remoteAddress in interface ChannelremoteAddress in interface SocketChannelremoteAddress in class AbstractChannelnull 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()
ChannelSocketAddress is supposed to be down-cast into more concrete
type such as InetSocketAddress to retrieve the detailed
information.localAddress in interface ChannellocalAddress in interface SocketChannellocalAddress in class AbstractChannelnull if this channel is not bound.protected java.net.SocketAddress localAddress0()
AbstractChannelSocketAddress which is bound locally.localAddress0 in class AbstractChannelprotected java.net.SocketAddress remoteAddress0()
AbstractChannelSocketAddress which the Channel is connected to.remoteAddress0 in class AbstractChannelprotected void doBind(java.net.SocketAddress local)
throws java.lang.Exception
AbstractChannelChannel to the SocketAddressdoBind in class AbstractChanneljava.lang.Exceptionpublic KQueueSocketChannelConfig config()
Channelconfig in interface Channelconfig in interface SocketChannelconfig in class AbstractKQueueChannelpublic ServerSocketChannel parent()
Channelparent in interface Channelparent in interface SocketChannelparent in class AbstractChannelnull if this channel does not have a parent channel.protected AbstractKQueueChannel.AbstractKQueueUnsafe newUnsafe()
AbstractChannelAbstractChannel.AbstractUnsafe instance which will be used for the life-time of the ChannelnewUnsafe in class AbstractKQueueStreamChannelprivate static java.net.InetSocketAddress computeRemoteAddr(java.net.InetSocketAddress remoteAddr,
java.net.InetSocketAddress osRemoteAddr)
protected boolean doConnect(java.net.SocketAddress remoteAddress,
java.net.SocketAddress localAddress)
throws java.lang.Exception
AbstractKQueueStreamChanneldoConnect in class AbstractKQueueStreamChanneljava.lang.Exception