Class NioReplicationTask

java.lang.Object
org.apache.catalina.tribes.transport.AbstractRxTask
org.apache.catalina.tribes.transport.nio.NioReplicationTask
All Implemented Interfaces:
Runnable

public class NioReplicationTask extends AbstractRxTask
A worker thread class which can drain channels and echo-back the input. Each instance is constructed with a reference to the owning thread pool object. When started, the thread loops forever waiting to be awakened to service the channel associated with a SelectionKey object. The worker is tasked by calling its serviceChannel() method with a SelectionKey object. The serviceChannel() method stores the key reference in the thread object then calls notify() to wake it up. When the channel has been drained, the worker thread returns itself to its parent pool.