@UnstableApi public final class KQueueDomainSocketChannel extends AbstractKQueueStreamChannel implements DomainSocketChannel
| Modifier and Type | Class and Description |
|---|---|
private class |
KQueueDomainSocketChannel.KQueueDomainUnsafe |
AbstractKQueueStreamChannel.KQueueStreamUnsafeAbstractKQueueChannel.AbstractKQueueUnsafeAbstractChannel.AbstractUnsafeChannel.Unsafe| Modifier and Type | Field and Description |
|---|---|
private KQueueDomainSocketChannelConfig |
config |
private DomainSocketAddress |
local |
private DomainSocketAddress |
remote |
active, inputClosedSeenErrorOnRead, jniSelfPtr, readReadyRunnablePending, socket| Constructor and Description |
|---|
KQueueDomainSocketChannel() |
KQueueDomainSocketChannel(Channel parent,
BsdSocket fd) |
KQueueDomainSocketChannel(int fd) |
| Modifier and Type | Method and Description |
|---|---|
KQueueDomainSocketChannelConfig |
config()
Returns the configuration of this channel.
|
protected void |
doBind(java.net.SocketAddress localAddress)
Bind the
Channel to the SocketAddress |
protected boolean |
doConnect(java.net.SocketAddress remoteAddress,
java.net.SocketAddress localAddress)
Connect to the remote peer
|
protected boolean |
doWriteSingle(ChannelOutboundBuffer in,
int writeSpinCount) |
protected java.lang.Object |
filterOutboundMessage(java.lang.Object msg)
Invoked when a new message is added to a
ChannelOutboundBuffer of this AbstractChannel, so that
the Channel implementation converts the message to another. |
DomainSocketAddress |
localAddress()
Returns the local address where this channel is bound to.
|
protected DomainSocketAddress |
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 |
PeerCredentials |
peerCredentials()
Returns the unix credentials (uid, gid, pid) of the peer
SO_PEERCRED
|
DomainSocketAddress |
remoteAddress()
Returns the remote address where this channel is connected to.
|
protected DomainSocketAddress |
remoteAddress0()
Return the
SocketAddress which the Channel is connected to. |
doClose, doWrite, 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, parent, pipeline, read, toString, unsafe, voidPromise, write, write, writeAndFlush, writeAndFlushattr, hasAttrclone, finalize, getClass, notify, notifyAll, wait, wait, waitfdisInputShutdown, isOutputShutdown, isShutdown, shutdown, shutdown, shutdownInput, shutdownInput, shutdownOutput, shutdownOutputalloc, bytesBeforeUnwritable, bytesBeforeWritable, closeFuture, eventLoop, flush, id, isActive, isOpen, isRegistered, isWritable, metadata, parent, 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 KQueueDomainSocketChannelConfig config
private volatile DomainSocketAddress local
private volatile DomainSocketAddress remote
public KQueueDomainSocketChannel()
public KQueueDomainSocketChannel(int fd)
protected AbstractKQueueChannel.AbstractKQueueUnsafe newUnsafe()
AbstractChannelAbstractChannel.AbstractUnsafe instance which will be used for the life-time of the ChannelnewUnsafe in class AbstractKQueueStreamChannelprotected DomainSocketAddress localAddress0()
AbstractChannelSocketAddress which is bound locally.localAddress0 in class AbstractChannelprotected DomainSocketAddress remoteAddress0()
AbstractChannelSocketAddress which the Channel is connected to.remoteAddress0 in class AbstractChannelprotected void doBind(java.net.SocketAddress localAddress)
throws java.lang.Exception
AbstractChannelChannel to the SocketAddressdoBind in class AbstractChanneljava.lang.Exceptionpublic KQueueDomainSocketChannelConfig config()
Channelconfig in interface Channelconfig in interface DomainSocketChannelconfig in class AbstractKQueueChannelprotected boolean doConnect(java.net.SocketAddress remoteAddress,
java.net.SocketAddress localAddress)
throws java.lang.Exception
AbstractKQueueStreamChanneldoConnect in class AbstractKQueueStreamChanneljava.lang.Exceptionpublic DomainSocketAddress 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 DomainSocketChannelremoteAddress 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 DomainSocketAddress 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 DomainSocketChannellocalAddress in class AbstractChannelnull if this channel is not bound.protected boolean doWriteSingle(ChannelOutboundBuffer in, int writeSpinCount) throws java.lang.Exception
doWriteSingle in class AbstractKQueueStreamChanneljava.lang.Exceptionprotected java.lang.Object filterOutboundMessage(java.lang.Object msg)
AbstractChannelChannelOutboundBuffer of this AbstractChannel, so that
the Channel implementation converts the message to another. (e.g. heap buffer -> direct buffer)filterOutboundMessage in class AbstractKQueueStreamChannel@UnstableApi public PeerCredentials peerCredentials() throws java.io.IOException
java.io.IOException