Class AbstractChannelHandlerContext
- All Implemented Interfaces:
ChannelHandlerContext, ChannelInboundInvoker, ChannelOutboundInvoker, AttributeMap, ResourceLeakHint
- Direct Known Subclasses:
DefaultChannelHandlerContext, DefaultChannelPipeline.HeadContext, DefaultChannelPipeline.TailContext
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class(package private) static final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final intChannelHandler.handlerAdded(ChannelHandlerContext)is about to be called.private final int(package private) final EventExecutorprivate static final AtomicIntegerFieldUpdater<AbstractChannelHandlerContext> private intprivate static final intprivate static final InternalLoggerprivate final String(package private) AbstractChannelHandlerContextprivate final booleanprivate final DefaultChannelPipeline(package private) AbstractChannelHandlerContextprivate static final intprivate ChannelFuture -
Constructor Summary
ConstructorsConstructorDescriptionAbstractChannelHandlerContext(DefaultChannelPipeline pipeline, EventExecutor executor, String name, Class<? extends ChannelHandler> handlerClass) -
Method Summary
Modifier and TypeMethodDescriptionalloc()Return the assignedByteBufAllocatorwhich will be used to allocateByteBufs.<T> Attribute<T> attr(AttributeKey<T> key) Get theAttributefor the givenAttributeKey.bind(SocketAddress localAddress) Request to bind to the givenSocketAddressand notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error.bind(SocketAddress localAddress, ChannelPromise promise) Request to bind to the givenSocketAddressand notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error.(package private) final void(package private) final voidchannel()Return theChannelwhich is bound to theChannelHandlerContext.close()Request to close theChanneland notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error.close(ChannelPromise promise) Request to close theChanneland notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error.connect(SocketAddress remoteAddress) Request to connect to the givenSocketAddressand notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error.connect(SocketAddress remoteAddress, ChannelPromise promise) Request to connect to the givenSocketAddressand notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error.connect(SocketAddress remoteAddress, SocketAddress localAddress) Request to connect to the givenSocketAddresswhile bind to the localAddress and notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error.connect(SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise) Request to connect to the givenSocketAddresswhile bind to the localAddress and notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error.Request to deregister from the previous assignedEventExecutorand notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error.deregister(ChannelPromise promise) Request to deregister from the previous assignedEventExecutorand notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error.Request to disconnect from the remote peer and notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error.disconnect(ChannelPromise promise) Request to disconnect from the remote peer and notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error.executor()Returns theEventExecutorwhich is used to execute an arbitrary task.private AbstractChannelHandlerContextfindContextInbound(int mask) private AbstractChannelHandlerContextfindContextOutbound(int mask) AChannelis active now, which means it is connected.AChannelis inactive now, which means it is closed.fireChannelRead(Object msg) AChannelreceived a message.Triggers anChannelInboundHandler.channelReadComplete(ChannelHandlerContext)event to the nextChannelInboundHandlerin theChannelPipeline.Triggers anChannelInboundHandler.channelWritabilityChanged(ChannelHandlerContext)event to the nextChannelInboundHandlerin theChannelPipeline.fireExceptionCaught(Throwable cause) fireUserEventTriggered(Object event) AChannelreceived an user defined event.flush()Request to flush all pending messages via this ChannelOutboundInvoker.<T> booleanhasAttr(AttributeKey<T> key) private voidinvokeBind(SocketAddress localAddress, ChannelPromise promise) private void(package private) static voidprivate void(package private) static void(package private) static voidinvokeChannelRead(AbstractChannelHandlerContext next, Object msg) private voidinvokeChannelRead(Object msg) private void(package private) static voidprivate void(package private) static voidprivate void(package private) static voidprivate void(package private) static voidprivate voidinvokeClose(ChannelPromise promise) private voidinvokeConnect(SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise) private voidinvokeDeregister(ChannelPromise promise) private voidinvokeDisconnect(ChannelPromise promise) (package private) static voidinvokeExceptionCaught(AbstractChannelHandlerContext next, Throwable cause) private voidinvokeExceptionCaught(Throwable cause) private voidprivate voidprivate booleanMakes best possible effort to detect ifChannelHandler.handlerAdded(ChannelHandlerContext)was called yet.private void(package private) static voidinvokeUserEventTriggered(AbstractChannelHandlerContext next, Object event) private voidinvokeUserEventTriggered(Object event) (package private) voidinvokeWrite(Object msg, ChannelPromise promise) private voidinvokeWrite0(Object msg, ChannelPromise promise) (package private) voidinvokeWriteAndFlush(Object msg, ChannelPromise promise) private booleanisNotValidPromise(ChannelPromise promise, boolean allowVoidPromise) booleanReturntrueif theChannelHandlerwhich belongs to this context was removed from theChannelPipeline.name()The unique name of theChannelHandlerContext.The name was used when thenChannelHandlerwas added to theChannelPipeline.newFailedFuture(Throwable cause) Create a newChannelFuturewhich is marked as failed already.Return an newChannelProgressivePromiseReturn a newChannelPromise.Create a newChannelFuturewhich is marked as succeeded already.private static voidnotifyOutboundHandlerException(Throwable cause, ChannelPromise promise) pipeline()Return the assignedChannelPipelineread()Request to Read data from theChannelinto the first inbound buffer, triggers anChannelInboundHandler.channelRead(ChannelHandlerContext, Object)event if data was read, and triggers achannelReadCompleteevent so the handler can decide to continue reading.private static booleansafeExecute(EventExecutor executor, Runnable runnable, ChannelPromise promise, Object msg, boolean lazy) (package private) final boolean(package private) final void(package private) final voidprivate static booleanskipContext(AbstractChannelHandlerContext ctx, EventExecutor currentExecutor, int mask, int onlyMask) Returns a human-readable message that potentially enables easier resource leak tracking.toString()Return a special ChannelPromise which can be reused for different operations.Request to write a message via thisChannelHandlerContextthrough theChannelPipeline.private voidwrite(Object msg, boolean flush, ChannelPromise promise) write(Object msg, ChannelPromise promise) Request to write a message via thisChannelHandlerContextthrough theChannelPipeline.writeAndFlush(Object msg) Shortcut for callChannelOutboundInvoker.write(Object)andChannelOutboundInvoker.flush().writeAndFlush(Object msg, ChannelPromise promise) Shortcut for callChannelOutboundInvoker.write(Object, ChannelPromise)andChannelOutboundInvoker.flush().Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ChannelHandlerContext
handler
-
Field Details
-
logger
-
next
-
prev
-
HANDLER_STATE_UPDATER
-
ADD_PENDING
private static final int ADD_PENDINGChannelHandler.handlerAdded(ChannelHandlerContext)is about to be called.- See Also:
-
ADD_COMPLETE
private static final int ADD_COMPLETE- See Also:
-
REMOVE_COMPLETE
private static final int REMOVE_COMPLETE- See Also:
-
INIT
private static final int INITNeitherChannelHandler.handlerAdded(ChannelHandlerContext)norChannelHandler.handlerRemoved(ChannelHandlerContext)was called.- See Also:
-
pipeline
-
name
-
ordered
private final boolean ordered -
executionMask
private final int executionMask -
executor
-
succeededFuture
-
invokeTasks
-
handlerState
private volatile int handlerState
-
-
Constructor Details
-
AbstractChannelHandlerContext
AbstractChannelHandlerContext(DefaultChannelPipeline pipeline, EventExecutor executor, String name, Class<? extends ChannelHandler> handlerClass)
-
-
Method Details
-
channel
Description copied from interface:ChannelHandlerContextReturn theChannelwhich is bound to theChannelHandlerContext.- Specified by:
channelin interfaceChannelHandlerContext
-
pipeline
Description copied from interface:ChannelHandlerContextReturn the assignedChannelPipeline- Specified by:
pipelinein interfaceChannelHandlerContext
-
alloc
Description copied from interface:ChannelHandlerContextReturn the assignedByteBufAllocatorwhich will be used to allocateByteBufs.- Specified by:
allocin interfaceChannelHandlerContext
-
executor
Description copied from interface:ChannelHandlerContextReturns theEventExecutorwhich is used to execute an arbitrary task.- Specified by:
executorin interfaceChannelHandlerContext
-
name
Description copied from interface:ChannelHandlerContextThe unique name of theChannelHandlerContext.The name was used when thenChannelHandlerwas added to theChannelPipeline. This name can also be used to access the registeredChannelHandlerfrom theChannelPipeline.- Specified by:
namein interfaceChannelHandlerContext
-
fireChannelRegistered
Description copied from interface:ChannelInboundInvokerAChannelwas registered to itsEventLoop. This will result in having theChannelInboundHandler.channelRegistered(ChannelHandlerContext)method called of the nextChannelInboundHandlercontained in theChannelPipelineof theChannel.- Specified by:
fireChannelRegisteredin interfaceChannelHandlerContext- Specified by:
fireChannelRegisteredin interfaceChannelInboundInvoker
-
invokeChannelRegistered
-
invokeChannelRegistered
private void invokeChannelRegistered() -
fireChannelUnregistered
Description copied from interface:ChannelInboundInvokerAChannelwas unregistered from itsEventLoop. This will result in having theChannelInboundHandler.channelUnregistered(ChannelHandlerContext)method called of the nextChannelInboundHandlercontained in theChannelPipelineof theChannel.- Specified by:
fireChannelUnregisteredin interfaceChannelHandlerContext- Specified by:
fireChannelUnregisteredin interfaceChannelInboundInvoker
-
invokeChannelUnregistered
-
invokeChannelUnregistered
private void invokeChannelUnregistered() -
fireChannelActive
Description copied from interface:ChannelInboundInvokerAChannelis active now, which means it is connected. This will result in having theChannelInboundHandler.channelActive(ChannelHandlerContext)method called of the nextChannelInboundHandlercontained in theChannelPipelineof theChannel.- Specified by:
fireChannelActivein interfaceChannelHandlerContext- Specified by:
fireChannelActivein interfaceChannelInboundInvoker
-
invokeChannelActive
-
invokeChannelActive
private void invokeChannelActive() -
fireChannelInactive
Description copied from interface:ChannelInboundInvokerAChannelis inactive now, which means it is closed. This will result in having theChannelInboundHandler.channelInactive(ChannelHandlerContext)method called of the nextChannelInboundHandlercontained in theChannelPipelineof theChannel.- Specified by:
fireChannelInactivein interfaceChannelHandlerContext- Specified by:
fireChannelInactivein interfaceChannelInboundInvoker
-
invokeChannelInactive
-
invokeChannelInactive
private void invokeChannelInactive() -
fireExceptionCaught
Description copied from interface:ChannelInboundInvokerAChannelreceived anThrowablein one of its inbound operations. This will result in having theChannelInboundHandler.exceptionCaught(ChannelHandlerContext, Throwable)method called of the nextChannelInboundHandlercontained in theChannelPipelineof theChannel.- Specified by:
fireExceptionCaughtin interfaceChannelHandlerContext- Specified by:
fireExceptionCaughtin interfaceChannelInboundInvoker
-
invokeExceptionCaught
-
invokeExceptionCaught
-
fireUserEventTriggered
Description copied from interface:ChannelInboundInvokerAChannelreceived an user defined event. This will result in having theChannelInboundHandler.userEventTriggered(ChannelHandlerContext, Object)method called of the nextChannelInboundHandlercontained in theChannelPipelineof theChannel.- Specified by:
fireUserEventTriggeredin interfaceChannelHandlerContext- Specified by:
fireUserEventTriggeredin interfaceChannelInboundInvoker
-
invokeUserEventTriggered
-
invokeUserEventTriggered
-
fireChannelRead
Description copied from interface:ChannelInboundInvokerAChannelreceived a message. This will result in having theChannelInboundHandler.channelRead(ChannelHandlerContext, Object)method called of the nextChannelInboundHandlercontained in theChannelPipelineof theChannel.- Specified by:
fireChannelReadin interfaceChannelHandlerContext- Specified by:
fireChannelReadin interfaceChannelInboundInvoker
-
invokeChannelRead
-
invokeChannelRead
-
fireChannelReadComplete
Description copied from interface:ChannelInboundInvokerTriggers anChannelInboundHandler.channelReadComplete(ChannelHandlerContext)event to the nextChannelInboundHandlerin theChannelPipeline.- Specified by:
fireChannelReadCompletein interfaceChannelHandlerContext- Specified by:
fireChannelReadCompletein interfaceChannelInboundInvoker
-
invokeChannelReadComplete
-
invokeChannelReadComplete
private void invokeChannelReadComplete() -
fireChannelWritabilityChanged
Description copied from interface:ChannelInboundInvokerTriggers anChannelInboundHandler.channelWritabilityChanged(ChannelHandlerContext)event to the nextChannelInboundHandlerin theChannelPipeline.- Specified by:
fireChannelWritabilityChangedin interfaceChannelHandlerContext- Specified by:
fireChannelWritabilityChangedin interfaceChannelInboundInvoker
-
invokeChannelWritabilityChanged
-
invokeChannelWritabilityChanged
private void invokeChannelWritabilityChanged() -
bind
Description copied from interface:ChannelOutboundInvokerRequest to bind to the givenSocketAddressand notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error.This will result in having the
ChannelOutboundHandler.bind(ChannelHandlerContext, SocketAddress, ChannelPromise)method called of the nextChannelOutboundHandlercontained in theChannelPipelineof theChannel.- Specified by:
bindin interfaceChannelOutboundInvoker
-
connect
Description copied from interface:ChannelOutboundInvokerRequest to connect to the givenSocketAddressand notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error.If the connection fails because of a connection timeout, the
ChannelFuturewill get failed with aConnectTimeoutException. If it fails because of connection refused aConnectExceptionwill be used.This will result in having the
ChannelOutboundHandler.connect(ChannelHandlerContext, SocketAddress, SocketAddress, ChannelPromise)method called of the nextChannelOutboundHandlercontained in theChannelPipelineof theChannel.- Specified by:
connectin interfaceChannelOutboundInvoker
-
connect
Description copied from interface:ChannelOutboundInvokerRequest to connect to the givenSocketAddresswhile bind to the localAddress and notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error.This will result in having the
ChannelOutboundHandler.connect(ChannelHandlerContext, SocketAddress, SocketAddress, ChannelPromise)method called of the nextChannelOutboundHandlercontained in theChannelPipelineof theChannel.- Specified by:
connectin interfaceChannelOutboundInvoker
-
disconnect
Description copied from interface:ChannelOutboundInvokerRequest to disconnect from the remote peer and notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error.This will result in having the
ChannelOutboundHandler.disconnect(ChannelHandlerContext, ChannelPromise)method called of the nextChannelOutboundHandlercontained in theChannelPipelineof theChannel.- Specified by:
disconnectin interfaceChannelOutboundInvoker
-
close
Description copied from interface:ChannelOutboundInvokerRequest to close theChanneland notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error. After it is closed it is not possible to reuse it again.This will result in having the
ChannelOutboundHandler.close(ChannelHandlerContext, ChannelPromise)method called of the nextChannelOutboundHandlercontained in theChannelPipelineof theChannel.- Specified by:
closein interfaceChannelOutboundInvoker
-
deregister
Description copied from interface:ChannelOutboundInvokerRequest to deregister from the previous assignedEventExecutorand notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error.This will result in having the
ChannelOutboundHandler.deregister(ChannelHandlerContext, ChannelPromise)method called of the nextChannelOutboundHandlercontained in theChannelPipelineof theChannel.- Specified by:
deregisterin interfaceChannelOutboundInvoker
-
bind
Description copied from interface:ChannelOutboundInvokerRequest to bind to the givenSocketAddressand notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error. The givenChannelPromisewill be notified.This will result in having the
ChannelOutboundHandler.bind(ChannelHandlerContext, SocketAddress, ChannelPromise)method called of the nextChannelOutboundHandlercontained in theChannelPipelineof theChannel.- Specified by:
bindin interfaceChannelOutboundInvoker
-
invokeBind
-
connect
Description copied from interface:ChannelOutboundInvokerRequest to connect to the givenSocketAddressand notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error. The givenChannelFuturewill be notified.If the connection fails because of a connection timeout, the
ChannelFuturewill get failed with aConnectTimeoutException. If it fails because of connection refused aConnectExceptionwill be used.This will result in having the
ChannelOutboundHandler.connect(ChannelHandlerContext, SocketAddress, SocketAddress, ChannelPromise)method called of the nextChannelOutboundHandlercontained in theChannelPipelineof theChannel.- Specified by:
connectin interfaceChannelOutboundInvoker
-
connect
public ChannelFuture connect(SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise) Description copied from interface:ChannelOutboundInvokerRequest to connect to the givenSocketAddresswhile bind to the localAddress and notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error. The givenChannelPromisewill be notified and also returned.This will result in having the
ChannelOutboundHandler.connect(ChannelHandlerContext, SocketAddress, SocketAddress, ChannelPromise)method called of the nextChannelOutboundHandlercontained in theChannelPipelineof theChannel.- Specified by:
connectin interfaceChannelOutboundInvoker
-
invokeConnect
private void invokeConnect(SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise) -
disconnect
Description copied from interface:ChannelOutboundInvokerRequest to disconnect from the remote peer and notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error. The givenChannelPromisewill be notified.This will result in having the
ChannelOutboundHandler.disconnect(ChannelHandlerContext, ChannelPromise)method called of the nextChannelOutboundHandlercontained in theChannelPipelineof theChannel.- Specified by:
disconnectin interfaceChannelOutboundInvoker
-
invokeDisconnect
-
close
Description copied from interface:ChannelOutboundInvokerRequest to close theChanneland notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error. After it is closed it is not possible to reuse it again. The givenChannelPromisewill be notified.This will result in having the
ChannelOutboundHandler.close(ChannelHandlerContext, ChannelPromise)method called of the nextChannelOutboundHandlercontained in theChannelPipelineof theChannel.- Specified by:
closein interfaceChannelOutboundInvoker
-
invokeClose
-
deregister
Description copied from interface:ChannelOutboundInvokerRequest to deregister from the previous assignedEventExecutorand notify theChannelFutureonce the operation completes, either because the operation was successful or because of an error. The givenChannelPromisewill be notified.This will result in having the
ChannelOutboundHandler.deregister(ChannelHandlerContext, ChannelPromise)method called of the nextChannelOutboundHandlercontained in theChannelPipelineof theChannel.- Specified by:
deregisterin interfaceChannelOutboundInvoker
-
invokeDeregister
-
read
Description copied from interface:ChannelOutboundInvokerRequest to Read data from theChannelinto the first inbound buffer, triggers anChannelInboundHandler.channelRead(ChannelHandlerContext, Object)event if data was read, and triggers achannelReadCompleteevent so the handler can decide to continue reading. If there's a pending read operation already, this method does nothing.This will result in having the
ChannelOutboundHandler.read(ChannelHandlerContext)method called of the nextChannelOutboundHandlercontained in theChannelPipelineof theChannel.- Specified by:
readin interfaceChannelHandlerContext- Specified by:
readin interfaceChannelOutboundInvoker
-
invokeRead
private void invokeRead() -
write
Description copied from interface:ChannelOutboundInvokerRequest to write a message via thisChannelHandlerContextthrough theChannelPipeline. This method will not request to actual flush, so be sure to callChannelOutboundInvoker.flush()once you want to request to flush all pending data to the actual transport.- Specified by:
writein interfaceChannelOutboundInvoker
-
write
Description copied from interface:ChannelOutboundInvokerRequest to write a message via thisChannelHandlerContextthrough theChannelPipeline. This method will not request to actual flush, so be sure to callChannelOutboundInvoker.flush()once you want to request to flush all pending data to the actual transport.- Specified by:
writein interfaceChannelOutboundInvoker
-
invokeWrite
-
invokeWrite0
-
flush
Description copied from interface:ChannelOutboundInvokerRequest to flush all pending messages via this ChannelOutboundInvoker.- Specified by:
flushin interfaceChannelHandlerContext- Specified by:
flushin interfaceChannelOutboundInvoker
-
invokeFlush
private void invokeFlush() -
invokeFlush0
private void invokeFlush0() -
writeAndFlush
Description copied from interface:ChannelOutboundInvokerShortcut for callChannelOutboundInvoker.write(Object, ChannelPromise)andChannelOutboundInvoker.flush().- Specified by:
writeAndFlushin interfaceChannelOutboundInvoker
-
invokeWriteAndFlush
-
write
-
writeAndFlush
Description copied from interface:ChannelOutboundInvokerShortcut for callChannelOutboundInvoker.write(Object)andChannelOutboundInvoker.flush().- Specified by:
writeAndFlushin interfaceChannelOutboundInvoker
-
notifyOutboundHandlerException
-
newPromise
Description copied from interface:ChannelOutboundInvokerReturn a newChannelPromise.- Specified by:
newPromisein interfaceChannelOutboundInvoker
-
newProgressivePromise
Description copied from interface:ChannelOutboundInvokerReturn an newChannelProgressivePromise- Specified by:
newProgressivePromisein interfaceChannelOutboundInvoker
-
newSucceededFuture
Description copied from interface:ChannelOutboundInvokerCreate a newChannelFuturewhich is marked as succeeded already. SoFuture.isSuccess()will returntrue. AllFutureListeneradded to it will be notified directly. Also every call of blocking methods will just return without blocking.- Specified by:
newSucceededFuturein interfaceChannelOutboundInvoker
-
newFailedFuture
Description copied from interface:ChannelOutboundInvokerCreate a newChannelFuturewhich is marked as failed already. SoFuture.isSuccess()will returnfalse. AllFutureListeneradded to it will be notified directly. Also every call of blocking methods will just return without blocking.- Specified by:
newFailedFuturein interfaceChannelOutboundInvoker
-
isNotValidPromise
-
findContextInbound
-
findContextOutbound
-
skipContext
private static boolean skipContext(AbstractChannelHandlerContext ctx, EventExecutor currentExecutor, int mask, int onlyMask) -
voidPromise
Description copied from interface:ChannelOutboundInvokerReturn a special ChannelPromise which can be reused for different operations.It's only supported to use it for
ChannelOutboundInvoker.write(Object, ChannelPromise).Be aware that the returned
Be aware this is an expert feature and should be used with care!ChannelPromisewill not support most operations and should only be used if you want to save an object allocation for every write operation. You will not be able to detect if the operation was complete, only if it failed as the implementation will callChannelPipeline.fireExceptionCaught(Throwable)in this case.- Specified by:
voidPromisein interfaceChannelOutboundInvoker
-
setRemoved
final void setRemoved() -
setAddComplete
final boolean setAddComplete() -
setAddPending
final void setAddPending() -
callHandlerAdded
-
callHandlerRemoved
-
invokeHandler
private boolean invokeHandler()Makes best possible effort to detect ifChannelHandler.handlerAdded(ChannelHandlerContext)was called yet. If not returnfalseand if called or could not detect returntrue. If this method returnsfalsewe will not invoke theChannelHandlerbut just forward the event. This is needed asDefaultChannelPipelinemay already put theChannelHandlerin the linked-list but not calledChannelHandler.handlerAdded(ChannelHandlerContext). -
isRemoved
public boolean isRemoved()Description copied from interface:ChannelHandlerContextReturntrueif theChannelHandlerwhich belongs to this context was removed from theChannelPipeline. Note that this method is only meant to be called from with in theEventLoop.- Specified by:
isRemovedin interfaceChannelHandlerContext
-
attr
Description copied from interface:AttributeMapGet theAttributefor the givenAttributeKey. This method will never return null, but may return anAttributewhich does not have a value set yet.- Specified by:
attrin interfaceAttributeMap- Specified by:
attrin interfaceChannelHandlerContext
-
hasAttr
Description copied from interface:AttributeMap- Specified by:
hasAttrin interfaceAttributeMap- Specified by:
hasAttrin interfaceChannelHandlerContext
-
safeExecute
private static boolean safeExecute(EventExecutor executor, Runnable runnable, ChannelPromise promise, Object msg, boolean lazy) -
toHintString
Description copied from interface:ResourceLeakHintReturns a human-readable message that potentially enables easier resource leak tracking.- Specified by:
toHintStringin interfaceResourceLeakHint
-
toString
-