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 ChannelHandlerContext
protected final ChannelEvent
(package private) int
private final Executor
protected static final ThreadLocal<Executor>
An internal use only thread-local variable that tells theExecutor
that this worker acquired a worker thread from. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ChannelEventRunnable
(ChannelHandlerContext ctx, ChannelEvent e, Executor executor) Creates aRunnable
which sends the specifiedChannelEvent
upstream via the specifiedChannelHandlerContext
. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
doRun()
Returns theChannelHandlerContext
which will be used to send theChannelEvent
upstream.getEvent()
Returns theChannelEvent
which will be sent upstream.final void
run()
unwrap()
Returns the underlying object that needs to be taken into account byObjectSizeEstimator
for more accurate object size estimation.
-
Field Details
-
PARENT
An internal use only thread-local variable that tells theExecutor
that this worker acquired a worker thread from. -
ctx
-
e
-
estimatedSize
int estimatedSize -
executor
-
-
Constructor Details
-
ChannelEventRunnable
Creates aRunnable
which sends the specifiedChannelEvent
upstream via the specifiedChannelHandlerContext
.
-
-
Method Details
-
getContext
Returns theChannelHandlerContext
which will be used to send theChannelEvent
upstream. -
getEvent
Returns theChannelEvent
which will be sent upstream. -
unwrap
Description copied from interface:EstimatableObjectWrapper
Returns the underlying object that needs to be taken into account byObjectSizeEstimator
for more accurate object size estimation.- Specified by:
unwrap
in interfaceEstimatableObjectWrapper
-
run
public final void run() -
doRun
protected abstract void doRun()
-