Class AbstractNioByteChannel.NioByteUnsafe
java.lang.Object
io.netty.channel.AbstractChannel.AbstractUnsafe
io.netty.channel.nio.AbstractNioChannel.AbstractNioUnsafe
io.netty.channel.nio.AbstractNioByteChannel.NioByteUnsafe
- All Implemented Interfaces:
Channel.Unsafe, IoHandle, AbstractNioChannel.NioUnsafe, NioIoHandle, AutoCloseable
- Enclosing class:
AbstractNioByteChannel
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractNioChannel.AbstractNioUnsafe
ch, close, connect, finishConnect, flush0, forceFlush, handle, removeReadOp, selectableChannelModifier 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, writeModifier and TypeMethodDescriptionprotected final ThrowableannotateConnectException(Throwable cause, SocketAddress remoteAddress) Appends the remote address to the message of the exceptions caused by connection attempt failure.final voidSchedules a read operation that fills the inbound buffer of the firstChannelInboundHandlerin theChannelPipeline.final voidbind(SocketAddress localAddress, ChannelPromise promise) voidclose(ChannelPromise promise) Close theChannelof theChannelPromiseand notify theChannelPromiseonce the operation was complete.protected voidclose(ChannelPromise promise, Throwable cause, ClosedChannelException closeCause) final voidCloses theChannelimmediately without firing any events.protected final voidvoidderegister(ChannelPromise promise) Deregister theChannelof theChannelPromisefromEventLoopand notify theChannelPromiseonce the operation was complete.final voiddisconnect(ChannelPromise promise) Disconnect theChannelof theChannelFutureand notify theChannelPromiseonce the operation was complete.protected final booleanensureOpen(ChannelPromise promise) final voidflush()Flush out all write operations scheduled viaChannel.Unsafe.write(Object, ChannelPromise).protected final voidfinal SocketAddressReturn theSocketAddressto which is bound local ornullif none.final ChannelOutboundBufferReturns theChannelOutboundBufferof theChannelwhere the pending write requests are stored.protected ExecutorPrepares to close theChannel.Return the assignedRecvByteBufAllocator.Handlewhich will be used to allocateByteBuf's when receiving data.final voidregister(EventLoop eventLoop, ChannelPromise promise) Register theChannelof theChannelPromiseand notify theChannelFutureonce the registration was complete.final SocketAddressReturn theSocketAddressto which is bound remote ornullif none is bound yet.protected final voidsafeSetFailure(ChannelPromise promise, Throwable cause) Marks the specifiedpromiseas failure.protected final voidsafeSetSuccess(ChannelPromise promise) Marks the specifiedpromiseas success.final voidshutdownOutput(ChannelPromise promise) Shutdown the output portion of the correspondingChannel.final ChannelPromiseReturn a special ChannelPromise which can be reused and passed to the operations inChannel.Unsafe.final voidwrite(Object msg, ChannelPromise promise) Schedules a write operation.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IoHandle
registered, unregisteredModifier and TypeMethodDescriptiondefault voidCalled once thisIoHandlewas registered and so will start to receive events viaIoHandle.handle(IoRegistration, IoEvent).default voidCalled once thisIoHandlewas unregistered and so will not receive any more events viaIoHandle.handle(IoRegistration, IoEvent).
-
Constructor Details
-
NioByteUnsafe
protected NioByteUnsafe()
-
-
Method Details
-
read
public final void read()Description copied from interface:AbstractNioChannel.NioUnsafeRead from underlyingSelectableChannel
-