Package io.netty.channel.epoll
Class AbstractEpollChannel.AbstractEpollUnsafe
java.lang.Object
io.netty.channel.AbstractChannel.AbstractUnsafe
io.netty.channel.epoll.AbstractEpollChannel.AbstractEpollUnsafe
- All Implemented Interfaces:
Channel.Unsafe
- Direct Known Subclasses:
AbstractEpollServerChannel.EpollServerSocketUnsafe
,AbstractEpollStreamChannel.EpollStreamUnsafe
,EpollDatagramChannel.EpollDatagramChannelUnsafe
,EpollDomainDatagramChannel.EpollDomainDatagramChannelUnsafe
- Enclosing class:
AbstractEpollChannel
protected abstract class AbstractEpollChannel.AbstractEpollUnsafe
extends AbstractChannel.AbstractUnsafe
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate EpollRecvByteAllocatorHandle
private final Runnable
(package private) boolean
(package private) boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
private void
Clear theNative.EPOLLRDHUP
flag from EPOLL, and close on failure.void
connect
(SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise) private boolean
Finish the connect(package private) final void
(package private) final void
epollInFinally
(ChannelConfig config) (package private) abstract void
Called once EPOLLIN event is ready to be processed(package private) final void
Called once a EPOLLOUT event is ready to be processed(package private) final void
Called once EPOLLRDHUP event is ready to be processed(package private) final void
private void
private void
fireEventAndClose
(Object evt) protected final void
flush0()
private void
fulfillConnectPromise
(ChannelPromise promise, boolean wasActive) private void
fulfillConnectPromise
(ChannelPromise promise, Throwable cause) (package private) EpollRecvByteAllocatorHandle
Create a newEpollRecvByteAllocatorHandle
instance.Return the assignedRecvByteBufAllocator.Handle
which will be used to allocateByteBuf
's when receiving data.(package private) void
shutdownInput
(boolean rdHup) Shutdown the input side of the channel.Methods inherited from class io.netty.channel.AbstractChannel.AbstractUnsafe
annotateConnectException, beginRead, bind, close, closeForcibly, closeIfClosed, deregister, disconnect, ensureOpen, flush, handleWriteError, localAddress, outboundBuffer, prepareToClose, register, remoteAddress, safeSetFailure, safeSetSuccess, shutdownOutput, voidPromise, write
-
Field Details
-
readPending
boolean readPending -
maybeMoreDataToRead
boolean maybeMoreDataToRead -
allocHandle
-
epollInReadyRunnable
-
-
Constructor Details
-
AbstractEpollUnsafe
protected AbstractEpollUnsafe()
-
-
Method Details
-
epollInReady
abstract void epollInReady()Called once EPOLLIN event is ready to be processed -
epollInBefore
final void epollInBefore() -
epollInFinally
-
executeEpollInReadyRunnable
-
epollRdHupReady
final void epollRdHupReady()Called once EPOLLRDHUP event is ready to be processed -
clearEpollRdHup
private void clearEpollRdHup()Clear theNative.EPOLLRDHUP
flag from EPOLL, and close on failure. -
shutdownInput
void shutdownInput(boolean rdHup) Shutdown the input side of the channel. -
fireEventAndClose
-
recvBufAllocHandle
Description copied from interface:Channel.Unsafe
Return the assignedRecvByteBufAllocator.Handle
which will be used to allocateByteBuf
's when receiving data.- Specified by:
recvBufAllocHandle
in interfaceChannel.Unsafe
- Overrides:
recvBufAllocHandle
in classAbstractChannel.AbstractUnsafe
-
newEpollHandle
Create a newEpollRecvByteAllocatorHandle
instance.- Parameters:
handle
- The handle to wrap with EPOLL specific logic.
-
flush0
protected final void flush0()- Overrides:
flush0
in classAbstractChannel.AbstractUnsafe
-
epollOutReady
final void epollOutReady()Called once a EPOLLOUT event is ready to be processed -
clearEpollIn0
protected final void clearEpollIn0() -
connect
public void connect(SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise) Description copied from interface:Channel.Unsafe
Connect theChannel
of the givenChannelFuture
with the given remoteSocketAddress
. If a specific localSocketAddress
should be used it need to be given as argument. Otherwise just passnull
to it. TheChannelPromise
will get notified once the connect operation was complete. -
fulfillConnectPromise
-
fulfillConnectPromise
-
finishConnect
private void finishConnect() -
doFinishConnect
Finish the connect- Throws:
Exception
-