public abstract class ChannelEventRunnable extends Object implements Runnable, EstimatableObjectWrapper
Modifier and Type | Field and Description |
---|---|
protected ChannelHandlerContext |
ctx |
protected ChannelEvent |
e |
protected static ThreadLocal<Executor> |
PARENT
An internal use only thread-local variable that tells the
Executor that this worker acquired a worker thread from. |
Modifier | Constructor and Description |
---|---|
protected |
ChannelEventRunnable(ChannelHandlerContext ctx,
ChannelEvent e,
Executor executor)
Creates a
Runnable which sends the specified ChannelEvent
upstream via the specified ChannelHandlerContext . |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
doRun() |
ChannelHandlerContext |
getContext()
Returns the
ChannelHandlerContext which will be used to
send the ChannelEvent upstream. |
ChannelEvent |
getEvent()
Returns the
ChannelEvent which will be sent upstream. |
void |
run() |
Object |
unwrap()
Returns the underlying object that needs to be taken into account
by
ObjectSizeEstimator for more accurate object size estimation. |
protected static final ThreadLocal<Executor> PARENT
Executor
that this worker acquired a worker thread from.protected final ChannelHandlerContext ctx
protected final ChannelEvent e
protected ChannelEventRunnable(ChannelHandlerContext ctx, ChannelEvent e, Executor executor)
Runnable
which sends the specified ChannelEvent
upstream via the specified ChannelHandlerContext
.public ChannelHandlerContext getContext()
ChannelHandlerContext
which will be used to
send the ChannelEvent
upstream.public ChannelEvent getEvent()
ChannelEvent
which will be sent upstream.public Object unwrap()
EstimatableObjectWrapper
ObjectSizeEstimator
for more accurate object size estimation.unwrap
in interface EstimatableObjectWrapper
protected abstract void doRun()
Copyright © 2008-2014 The Netty Project. All Rights Reserved.