org.jboss.netty.handler.execution

## 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

Fields
`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.

### Constructor Summary

Constructors
Constructor and Description
`ChannelEventRunnable(ChannelHandlerContext ctx, ChannelEvent e, Executor executor)` Creates a `Runnable` which sends the specified `ChannelEvent` upstream via the specified `ChannelHandlerContext`.

### Method Summary

Methods
`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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### PARENT

    protected static final ThreadLocal<Executor> PARENT

An internal use only thread-local variable that tells the `Executor` that this worker acquired a worker thread from.

#### ctx

    protected final ChannelHandlerContext ctx

#### e

    protected final ChannelEvent e

### Constructor Detail

#### ChannelEventRunnable

    public ChannelEventRunnable(ChannelHandlerContext ctx,
                        ChannelEvent e,
                        Executor executor)

Creates a `Runnable` which sends the specified `ChannelEvent` upstream via the specified `ChannelHandlerContext`.

### Method Detail

#### getContext

    public ChannelHandlerContext getContext()

Returns the `ChannelHandlerContext` which will be used to send the `ChannelEvent` upstream.

#### getEvent

    public ChannelEvent getEvent()

Returns the `ChannelEvent` which will be sent upstream.

#### unwrap

    public Object unwrap()

Description copied from interface: `EstimatableObjectWrapper`
Returns the underlying object that needs to be taken into account by `ObjectSizeEstimator` for more accurate object size estimation.

Specified by:
  `unwrap` in interface `EstimatableObjectWrapper`

#### run

    public final void run()

Specified by:
  `run` in interface `Runnable`

#### doRun

    protected abstract void doRun()