public final class EpollDomainSocketChannel extends AbstractEpollStreamChannel implements DomainSocketChannel
Modifier and Type | Class and Description |
---|---|
private class |
EpollDomainSocketChannel.EpollDomainUnsafe |
AbstractEpollStreamChannel.EpollStreamUnsafe, AbstractEpollStreamChannel.SpliceInTask
AbstractEpollChannel.AbstractEpollUnsafe
AbstractChannel.AbstractUnsafe
Channel.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, spliceTo
checkResolvable, clearEpollIn, clearFlag, doBeginRead, doDeregister, doDisconnect, doReadBytes, doRegister, doWriteBytes, fd, isActive, isCompatible, isFlagSet, isOpen, isSoErrorZero, metadata, newDirectBuffer, newDirectBuffer, setFlag
alloc, 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, writeAndFlush
attr
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
fd
isInputShutdown, isOutputShutdown, shutdownOutput, shutdownOutput
alloc, 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, writeAndFlush
attr
private 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 FileDescriptor
protected AbstractEpollChannel.AbstractEpollUnsafe newUnsafe()
AbstractChannel
AbstractChannel.AbstractUnsafe
instance which will be used for the life-time of the Channel
newUnsafe
in class AbstractEpollStreamChannel
protected DomainSocketAddress localAddress0()
AbstractChannel
SocketAddress
which is bound locally.localAddress0
in class AbstractChannel
protected DomainSocketAddress remoteAddress0()
AbstractChannel
SocketAddress
which the Channel
is connected to.remoteAddress0
in class AbstractChannel
protected void doBind(java.net.SocketAddress localAddress) throws java.lang.Exception
AbstractChannel
Channel
to the SocketAddress
doBind
in class AbstractChannel
java.lang.Exception
public EpollDomainSocketChannelConfig config()
Channel
config
in interface Channel
config
in interface DomainSocketChannel
config
in class AbstractEpollChannel
protected boolean doConnect(java.net.SocketAddress remoteAddress, java.net.SocketAddress localAddress) throws java.lang.Exception
AbstractEpollStreamChannel
doConnect
in class AbstractEpollStreamChannel
java.lang.Exception
public DomainSocketAddress 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 DomainSocketChannel
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 DomainSocketAddress 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 DomainSocketChannel
localAddress
in class AbstractChannel
null
if this channel is not bound.protected boolean doWriteSingle(ChannelOutboundBuffer in, int writeSpinCount) throws java.lang.Exception
doWriteSingle
in class AbstractEpollStreamChannel
java.lang.Exception
protected java.lang.Object filterOutboundMessage(java.lang.Object msg)
AbstractChannel
ChannelOutboundBuffer
of this AbstractChannel
, so that
the Channel
implementation converts the message to another. (e.g. heap buffer -> direct buffer)filterOutboundMessage
in class AbstractEpollStreamChannel