public final class EpollServerSocketChannel extends AbstractEpollServerChannel implements ServerSocketChannel
ServerSocketChannel implementation that uses linux EPOLL Edge-Triggered Mode for
maximal performance.AbstractEpollServerChannel.EpollServerSocketUnsafeAbstractEpollChannel.AbstractEpollUnsafeAbstractChannel.AbstractUnsafeChannel.Unsafe| Modifier and Type | Field and Description |
|---|---|
private EpollServerSocketChannelConfig |
config |
private java.net.InetSocketAddress |
local |
private java.util.Collection<java.net.InetAddress> |
tcpMd5SigAddresses |
active, flags| Constructor and Description |
|---|
EpollServerSocketChannel() |
EpollServerSocketChannel(FileDescriptor fd)
Deprecated.
Use
EpollServerSocketChannel(Socket, boolean).
Creates a new EpollServerSocketChannel from an existing FileDescriptor. |
EpollServerSocketChannel(Socket fd)
Deprecated.
Use
EpollServerSocketChannel(Socket, boolean).
Creates a new EpollServerSocketChannel from an existing Socket. |
EpollServerSocketChannel(Socket fd,
boolean active) |
| Modifier and Type | Method and Description |
|---|---|
EpollServerSocketChannelConfig |
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.
|
(package private) void |
setTcpMd5Sig(java.util.Map<java.net.InetAddress,byte[]> keys) |
(package private) java.util.Collection<java.net.InetAddress> |
tcpMd5SigAddresses() |
doWrite, filterOutboundMessage, newUnsafe, remoteAddress0checkResolvable, clearEpollIn, clearFlag, doBeginRead, doClose, doDeregister, doDisconnect, doReadBytes, doRegister, doWriteBytes, fd, isActive, 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, waitalloc, 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 EpollServerSocketChannelConfig config
private volatile java.net.InetSocketAddress local
private volatile java.util.Collection<java.net.InetAddress> tcpMd5SigAddresses
public EpollServerSocketChannel()
@Deprecated public EpollServerSocketChannel(FileDescriptor fd)
EpollServerSocketChannel(Socket, boolean).
Creates a new EpollServerSocketChannel from an existing FileDescriptor.@Deprecated public EpollServerSocketChannel(Socket fd)
EpollServerSocketChannel(Socket, boolean).
Creates a new EpollServerSocketChannel from an existing Socket.public EpollServerSocketChannel(Socket fd, boolean active)
protected boolean isCompatible(EventLoop loop)
AbstractChanneltrue if the given EventLoop is compatible with this instance.isCompatible in class AbstractEpollServerChannelprotected void doBind(java.net.SocketAddress localAddress)
throws java.lang.Exception
AbstractChannelChannel to the SocketAddressdoBind in class AbstractChanneljava.lang.Exceptionpublic 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 ServerSocketChannelremoteAddress 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 ServerSocketChannellocalAddress in class AbstractChannelnull if this channel is not bound.public EpollServerSocketChannelConfig config()
Channelconfig in interface Channelconfig in interface ServerSocketChannelconfig in class AbstractEpollChannelprotected java.net.InetSocketAddress localAddress0()
AbstractChannelSocketAddress which is bound locally.localAddress0 in class AbstractChannelprotected Channel newChildChannel(int fd, byte[] address, int offset, int len) throws java.lang.Exception
newChildChannel in class AbstractEpollServerChanneljava.lang.Exceptionjava.util.Collection<java.net.InetAddress> tcpMd5SigAddresses()
void setTcpMd5Sig(java.util.Map<java.net.InetAddress,byte[]> keys)
throws java.io.IOException
java.io.IOException