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
,Comparable<Channel>
- Direct Known Subclasses:
EpollServerDomainSocketChannel
,EpollServerSocketChannel
public abstract class AbstractEpollServerChannel
extends AbstractEpollChannel
implements ServerChannel
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) final class
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
FieldsFields inherited from class io.netty.channel.epoll.AbstractEpollChannel
active, epollInReadyRunnablePending, flags, inputClosedSeenErrorOnRead, socket
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractEpollServerChannel
(int fd) protected
protected
AbstractEpollServerChannel
(LinuxSocket fd, boolean active) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
doConnect
(SocketAddress remoteAddress, SocketAddress localAddress) Connect to the remote peerprotected void
Flush the content of the given buffer to the remote peer.protected Object
Invoked when a new message is added to aChannelOutboundBuffer
of thisAbstractChannel
, so that theChannel
implementation converts the message to another.protected boolean
isCompatible
(EventLoop loop) Returntrue
if the givenEventLoop
is compatible with this instance.metadata()
protected abstract Channel
newChildChannel
(int fd, byte[] remote, int offset, int len) protected AbstractEpollChannel.AbstractEpollUnsafe
Create a newAbstractChannel.AbstractUnsafe
instance which will be used for the life-time of theChannel
protected InetSocketAddress
Return theSocketAddress
which theChannel
is 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
Methods inherited from interface java.lang.Comparable
compareTo
-
Field Details
-
METADATA
-
-
Constructor Details
-
AbstractEpollServerChannel
protected AbstractEpollServerChannel(int fd) -
AbstractEpollServerChannel
-
AbstractEpollServerChannel
-
-
Method Details
-
metadata
Description copied from interface:Channel
- Specified by:
metadata
in interfaceChannel
- Overrides:
metadata
in classAbstractEpollChannel
-
isCompatible
Description copied from class:AbstractChannel
Returntrue
if the givenEventLoop
is compatible with this instance.- Overrides:
isCompatible
in classAbstractEpollChannel
-
remoteAddress0
Description copied from class:AbstractChannel
Return theSocketAddress
which theChannel
is connected to.- Overrides:
remoteAddress0
in classAbstractEpollChannel
-
newUnsafe
Description copied from class:AbstractChannel
Create a newAbstractChannel.AbstractUnsafe
instance which will be used for the life-time of theChannel
- Specified by:
newUnsafe
in classAbstractEpollChannel
-
doWrite
Description copied from class:AbstractChannel
Flush the content of the given buffer to the remote peer.- Specified by:
doWrite
in classAbstractChannel
- Throws:
Exception
-
filterOutboundMessage
Description copied from class:AbstractChannel
Invoked when a new message is added to aChannelOutboundBuffer
of thisAbstractChannel
, so that theChannel
implementation converts the message to another. (e.g. heap buffer -> direct buffer)- Overrides:
filterOutboundMessage
in classAbstractChannel
- Throws:
Exception
-
newChildChannel
protected abstract Channel newChildChannel(int fd, byte[] remote, int offset, int len) throws Exception - Throws:
Exception
-
doConnect
protected boolean doConnect(SocketAddress remoteAddress, SocketAddress localAddress) throws Exception Description copied from class:AbstractEpollChannel
Connect to the remote peer- Overrides:
doConnect
in classAbstractEpollChannel
- Throws:
Exception
-