public final class EpollDomainSocketChannel extends AbstractEpollStreamChannel implements DomainSocketChannel
| Modifier and Type | Class and Description |
|---|---|
private class |
EpollDomainSocketChannel.EpollDomainUnsafe |
AbstractEpollStreamChannel.EpollStreamUnsafe, AbstractEpollStreamChannel.SpliceInTaskAbstractEpollChannel.AbstractEpollUnsafeAbstractChannel.AbstractUnsafeChannel.Unsafe| Modifier and Type | Field and Description |
|---|---|
private EpollDomainSocketChannelConfig |
config |
private DomainSocketAddress |
local |
private DomainSocketAddress |
remote |
active, flags| Constructor and Description |
|---|
EpollDomainSocketChannel() |
EpollDomainSocketChannel(Channel parent,
FileDescriptor fd)
Deprecated.
|
EpollDomainSocketChannel(Channel parent,
Socket fd) |
EpollDomainSocketChannel(FileDescriptor fd)
Deprecated.
Use
EpollDomainSocketChannel(Socket, boolean).
Creates a new |
EpollDomainSocketChannel(Socket fd,
boolean active)
Creates a new
EpollDomainSocketChannel from an existing FileDescriptor |
| Modifier and Type | Method and Description |
|---|---|
EpollDomainSocketChannelConfig |
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 AbstractEpollChannel.AbstractEpollUnsafe |
newUnsafe()
Create a new
AbstractChannel.AbstractUnsafe instance which will be used for the life-time of the Channel |
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, shutdownOutput, shutdownOutput, shutdownOutput0, spliceTo, spliceTo, spliceTo, spliceTocheckResolvable, clearEpollIn, clearFlag, doBeginRead, doDeregister, doDisconnect, doReadBytes, doRegister, doWriteBytes, fd, isActive, isCompatible, isFlagSet, isOpen, isSoErrorZero, metadata, newDirectBuffer, newDirectBuffer, setFlagalloc, bind, bind, close, close, closeFuture, compareTo, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, equals, eventLoop, flush, hashCode, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, isWritable, newChannelPipeline, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, toString, unsafe, voidPromise, write, write, writeAndFlush, writeAndFlushattrclone, finalize, getClass, notify, notifyAll, wait, wait, waitfdisInputShutdown, isOutputShutdown, shutdownOutput, shutdownOutputalloc, bind, bind, close, close, closeFuture, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, eventLoop, flush, isActive, isOpen, isRegistered, isWritable, metadata, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, unsafe, voidPromise, write, write, writeAndFlush, writeAndFlushattrprivate final EpollDomainSocketChannelConfig config
private volatile DomainSocketAddress local
private volatile DomainSocketAddress remote
public EpollDomainSocketChannel()
@Deprecated public EpollDomainSocketChannel(Channel parent, FileDescriptor fd)
EpollDomainSocketChannel(Channel, Socket).@Deprecated public EpollDomainSocketChannel(FileDescriptor fd)
EpollDomainSocketChannel(Socket, boolean).
Creates a new EpollDomainSocketChannel from an existing FileDescriptor
public EpollDomainSocketChannel(Socket fd, boolean active)
EpollDomainSocketChannel from an existing FileDescriptorprotected AbstractEpollChannel.AbstractEpollUnsafe newUnsafe()
AbstractChannelAbstractChannel.AbstractUnsafe instance which will be used for the life-time of the ChannelnewUnsafe in class AbstractEpollStreamChannelprotected 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 EpollDomainSocketChannelConfig config()
Channelconfig in interface Channelconfig in interface DomainSocketChannelconfig in class AbstractEpollChannelprotected boolean doConnect(java.net.SocketAddress remoteAddress,
java.net.SocketAddress localAddress)
throws java.lang.Exception
AbstractEpollStreamChanneldoConnect in class AbstractEpollStreamChanneljava.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 AbstractEpollStreamChanneljava.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 AbstractEpollStreamChannel