Class AbstractNioChannel.AbstractNioUnsafe
java.lang.Object
io.netty.channel.AbstractChannel.AbstractUnsafe
io.netty.channel.nio.AbstractNioChannel.AbstractNioUnsafe
- All Implemented Interfaces:
Channel.Unsafe, IoHandle, AbstractNioChannel.NioUnsafe, NioIoHandle, AutoCloseable
- Direct Known Subclasses:
AbstractNioByteChannel.NioByteUnsafe
- Enclosing class:
AbstractNioChannel
protected abstract class AbstractNioChannel.AbstractNioUnsafe
extends AbstractChannel.AbstractUnsafe
implements AbstractNioChannel.NioUnsafe, NioIoHandle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal SelectableChannelch()Return underlyingSelectableChannelvoidclose()Called once theIoHandleshould be closed.final voidconnect(SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise) final voidFinish connectprotected final voidflush0()final voidvoidhandle(IoRegistration registration, IoEvent event) Be called once there is something to handle.protected final voidThe underlyingSelectableChannel.Methods inherited from class AbstractChannel.AbstractUnsafe
annotateConnectException, beginRead, bind, close, close, closeForcibly, closeIfClosed, deregister, disconnect, ensureOpen, flush, handleWriteError, localAddress, outboundBuffer, prepareToClose, recvBufAllocHandle, register, remoteAddress, safeSetFailure, safeSetSuccess, shutdownOutput, voidPromise, writeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AbstractNioChannel.NioUnsafe
readMethods inherited from interface Channel.Unsafe
beginRead, bind, close, closeForcibly, deregister, disconnect, flush, localAddress, outboundBuffer, recvBufAllocHandle, register, remoteAddress, voidPromise, writeMethods inherited from interface IoHandle
registered, unregistered
-
Constructor Details
-
AbstractNioUnsafe
protected AbstractNioUnsafe()
-
-
Method Details
-
close
public void close()Description copied from interface:IoHandleCalled once theIoHandleshould be closed. Even once this method is called this handle might still receive events viaIoHandle.handle(IoRegistration, IoEvent)(if it was previous be registered and so itsIoHandle.registered()method was called) until theIoHandle.unregistered()method is called.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceIoHandle
-
selectableChannel
Description copied from interface:NioIoHandleThe underlyingSelectableChannel.- Specified by:
selectableChannelin interfaceNioIoHandle- Returns:
- the channel
-
removeReadOp
protected final void removeReadOp() -
ch
Description copied from interface:AbstractNioChannel.NioUnsafeReturn underlyingSelectableChannel- Specified by:
chin interfaceAbstractNioChannel.NioUnsafe
-
connect
public final void connect(SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise) Description copied from interface:Channel.UnsafeConnect theChannelof the givenChannelFuturewith the given remoteSocketAddress. If a specific localSocketAddressshould be used it need to be given as argument. Otherwise just passnullto it. TheChannelPromisewill get notified once the connect operation was complete.- Specified by:
connectin interfaceChannel.Unsafe
-
finishConnect
public final void finishConnect()Description copied from interface:AbstractNioChannel.NioUnsafeFinish connect- Specified by:
finishConnectin interfaceAbstractNioChannel.NioUnsafe
-
flush0
protected final void flush0()- Overrides:
flush0in classAbstractChannel.AbstractUnsafe
-
forceFlush
public final void forceFlush()- Specified by:
forceFlushin interfaceAbstractNioChannel.NioUnsafe
-
handle
Description copied from interface:IoHandleBe called once there is something to handle.
-