Class ChannelEventRunnable
java.lang.Object
org.jboss.netty.handler.execution.ChannelEventRunnable
- All Implemented Interfaces:
Runnable, EstimatableObjectWrapper
- Direct Known Subclasses:
ChannelDownstreamEventRunnable, ChannelUpstreamEventRunnable
public abstract class ChannelEventRunnable
extends Object
implements Runnable, EstimatableObjectWrapper
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ChannelHandlerContextprotected final ChannelEvent(package private) intprivate final Executorprotected static final ThreadLocal<Executor> An internal use only thread-local variable that tells theExecutorthat this worker acquired a worker thread from. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedChannelEventRunnable(ChannelHandlerContext ctx, ChannelEvent e, Executor executor) Creates aRunnablewhich sends the specifiedChannelEventupstream via the specifiedChannelHandlerContext. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voiddoRun()Returns theChannelHandlerContextwhich will be used to send theChannelEventupstream.getEvent()Returns theChannelEventwhich will be sent upstream.final voidrun()unwrap()Returns the underlying object that needs to be taken into account byObjectSizeEstimatorfor more accurate object size estimation.
-
Field Details
-
PARENT
An internal use only thread-local variable that tells theExecutorthat this worker acquired a worker thread from. -
ctx
-
e
-
estimatedSize
int estimatedSize -
executor
-
-
Constructor Details
-
ChannelEventRunnable
Creates aRunnablewhich sends the specifiedChannelEventupstream via the specifiedChannelHandlerContext.
-
-
Method Details
-
getContext
Returns theChannelHandlerContextwhich will be used to send theChannelEventupstream. -
getEvent
Returns theChannelEventwhich will be sent upstream. -
unwrap
Description copied from interface:EstimatableObjectWrapperReturns the underlying object that needs to be taken into account byObjectSizeEstimatorfor more accurate object size estimation.- Specified by:
unwrapin interfaceEstimatableObjectWrapper
-
run
-
doRun
protected abstract void doRun()
-