Package io.netty.channel.epoll
Class AbstractEpollServerChannel
- java.lang.Object
-
- io.netty.util.DefaultAttributeMap
-
- io.netty.channel.AbstractChannel
-
- io.netty.channel.epoll.AbstractEpollChannel
-
- io.netty.channel.epoll.AbstractEpollServerChannel
-
- All Implemented Interfaces:
Channel,ChannelOutboundInvoker,ServerChannel,UnixChannel,AttributeMap,java.lang.Comparable<Channel>
- Direct Known Subclasses:
EpollServerDomainSocketChannel,EpollServerSocketChannel
public abstract class AbstractEpollServerChannel extends AbstractEpollChannel implements ServerChannel
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) classAbstractEpollServerChannel.EpollServerSocketUnsafe-
Nested classes/interfaces inherited from class io.netty.channel.epoll.AbstractEpollChannel
AbstractEpollChannel.AbstractEpollUnsafe
-
Nested classes/interfaces inherited from class io.netty.channel.AbstractChannel
AbstractChannel.AbstractUnsafe
-
Nested classes/interfaces inherited from interface io.netty.channel.Channel
Channel.Unsafe
-
-
Field Summary
Fields Modifier and Type Field Description private static ChannelMetadataMETADATA-
Fields inherited from class io.netty.channel.epoll.AbstractEpollChannel
active, epollInReadyRunnablePending, flags, inputClosedSeenErrorOnRead, socket
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractEpollServerChannel(int fd)protectedAbstractEpollServerChannel(LinuxSocket fd)protectedAbstractEpollServerChannel(LinuxSocket fd, boolean active)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected booleandoConnect(java.net.SocketAddress remoteAddress, java.net.SocketAddress localAddress)Connect to the remote peerprotected voiddoWrite(ChannelOutboundBuffer in)Flush the content of the given buffer to the remote peer.protected java.lang.ObjectfilterOutboundMessage(java.lang.Object msg)Invoked when a new message is added to aChannelOutboundBufferof thisAbstractChannel, so that theChannelimplementation converts the message to another.protected booleanisCompatible(EventLoop loop)Returntrueif the givenEventLoopis compatible with this instance.ChannelMetadatametadata()protected abstract ChannelnewChildChannel(int fd, byte[] remote, int offset, int len)protected AbstractEpollChannel.AbstractEpollUnsafenewUnsafe()Create a newAbstractChannel.AbstractUnsafeinstance which will be used for the life-time of theChannelprotected java.net.InetSocketAddressremoteAddress0()Return theSocketAddresswhich theChannelis connected to.-
Methods inherited from class io.netty.channel.epoll.AbstractEpollChannel
checkResolvable, clearEpollIn, clearFlag, config, doBeginRead, doBind, doClose, doConnect0, doDeregister, doDisconnect, doReadBytes, doRegister, doWriteBytes, doWriteOrSendBytes, fd, isActive, isFlagSet, isOpen, isSoErrorZero, localAddress0, newDirectBuffer, newDirectBuffer, resetCachedAddresses, setFlag, shouldBreakEpollInReady
-
Methods inherited from class io.netty.channel.AbstractChannel
alloc, bind, bind, bytesBeforeUnwritable, bytesBeforeWritable, close, close, closeFuture, compareTo, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, doShutdownOutput, equals, eventLoop, flush, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, isWritable, localAddress, maxMessagesPerWrite, newChannelPipeline, newFailedFuture, newId, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, remoteAddress, toString, unsafe, validateFileRegion, voidPromise, write, write, writeAndFlush, writeAndFlush
-
Methods inherited from class io.netty.util.DefaultAttributeMap
attr, hasAttr
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.netty.util.AttributeMap
attr, hasAttr
-
Methods inherited from interface io.netty.channel.Channel
alloc, bytesBeforeUnwritable, bytesBeforeWritable, closeFuture, config, eventLoop, flush, id, isActive, isOpen, isRegistered, isWritable, localAddress, parent, pipeline, read, remoteAddress, unsafe
-
Methods inherited from interface io.netty.channel.ChannelOutboundInvoker
bind, bind, close, close, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, voidPromise, write, write, writeAndFlush, writeAndFlush
-
-
-
-
Field Detail
-
METADATA
private static final ChannelMetadata METADATA
-
-
Constructor Detail
-
AbstractEpollServerChannel
protected AbstractEpollServerChannel(int fd)
-
AbstractEpollServerChannel
protected AbstractEpollServerChannel(LinuxSocket fd)
-
AbstractEpollServerChannel
protected AbstractEpollServerChannel(LinuxSocket fd, boolean active)
-
-
Method Detail
-
metadata
public ChannelMetadata metadata()
Description copied from interface:Channel- Specified by:
metadatain interfaceChannel- Overrides:
metadatain classAbstractEpollChannel
-
isCompatible
protected boolean isCompatible(EventLoop loop)
Description copied from class:AbstractChannelReturntrueif the givenEventLoopis compatible with this instance.- Overrides:
isCompatiblein classAbstractEpollChannel
-
remoteAddress0
protected java.net.InetSocketAddress remoteAddress0()
Description copied from class:AbstractChannelReturn theSocketAddresswhich theChannelis connected to.- Overrides:
remoteAddress0in classAbstractEpollChannel
-
newUnsafe
protected AbstractEpollChannel.AbstractEpollUnsafe newUnsafe()
Description copied from class:AbstractChannelCreate a newAbstractChannel.AbstractUnsafeinstance which will be used for the life-time of theChannel- Specified by:
newUnsafein classAbstractEpollChannel
-
doWrite
protected void doWrite(ChannelOutboundBuffer in) throws java.lang.Exception
Description copied from class:AbstractChannelFlush the content of the given buffer to the remote peer.- Specified by:
doWritein classAbstractChannel- Throws:
java.lang.Exception
-
filterOutboundMessage
protected java.lang.Object filterOutboundMessage(java.lang.Object msg) throws java.lang.ExceptionDescription copied from class:AbstractChannelInvoked when a new message is added to aChannelOutboundBufferof thisAbstractChannel, so that theChannelimplementation converts the message to another. (e.g. heap buffer -> direct buffer)- Overrides:
filterOutboundMessagein classAbstractChannel- Throws:
java.lang.Exception
-
newChildChannel
protected abstract Channel newChildChannel(int fd, byte[] remote, int offset, int len) throws java.lang.Exception
- Throws:
java.lang.Exception
-
doConnect
protected boolean doConnect(java.net.SocketAddress remoteAddress, java.net.SocketAddress localAddress) throws java.lang.ExceptionDescription copied from class:AbstractEpollChannelConnect to the remote peer- Overrides:
doConnectin classAbstractEpollChannel- Throws:
java.lang.Exception
-
-