DataType - the type of the data provided by the
ChannelProcessor to the AsyncDataListenerChannelType - the type of the channel which can be handled and
processed by the ChannelProcessorpublic interface ChannelProcessor<DataType,ChannelType extends Channel>
Channel and
to forward the processed data to an AsyncDataListener.
This interface was designed for the AsyncChannelLink which relies
on a ChannelProcessor to actually process the content of the channel
opened and provide the requested data.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
ChannelProcessor.StateListener
The interface through which the
ChannelProcessor may set the
current state of progress of the processing of the channel. |
| Modifier and Type | Method and Description |
|---|---|
void |
processChannel(ChannelType channel,
AsyncDataListener<DataType> listener,
ChannelProcessor.StateListener stateListener)
Processes the content of specified open channel and forwards the
processed content to the specified
AsyncDataListener. |
void processChannel(ChannelType channel, AsyncDataListener<DataType> listener, ChannelProcessor.StateListener stateListener) throws IOException
AsyncDataListener. This method
may or may not call the
onDoneReceive method
of the specified listener but if it does, it must honor the contract of
the AsyncDataListener and stop forwarding anymore data.channel - the channel whose content is to be processed and be
forwarded to the specified listener. This channel may only be accessed
in this method call and does not need to be closed in this method call.
This argument cannot be null.listener - the listener to which processed data is to be forwarded.
The data maybe forwarded only during this method call. The
onDoneReceive method of this listener does not need to be
called by this method but otherwise, this method must honor the
contract of the listener. This argument cannot be null.stateListener - the StateListener through which this method
call may show its current progress of processing the channel. This
argument cannot be null.IOException - thrown if there was some error, while processing the
channel. Throwing this exception, of course, means the termination of
the data providing.