|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ChannelHandler
Handles or intercepts a ChannelEvent
, and sends a
ChannelEvent
to the next handler in a ChannelPipeline
.
ChannelHandler
itself does not provide any method. To handle a
ChannelEvent
you need to implement its sub-interfaces. There are
two sub-interfaces which handles a received event, one for upstream events
and the other for downstream events:
ChannelUpstreamHandler
handles and intercepts an upstream ChannelEvent
.ChannelDownstreamHandler
handles and intercepts a downstream ChannelEvent
.
A ChannelHandler
is provided with a ChannelHandlerContext
object. A ChannelHandler
is supposed to interact with the
ChannelPipeline
it belongs to via a context object. Using the
context object, the ChannelHandler
can pass events upstream or
downstream, modify the behavior of the pipeline, or store the information
(attachment) which is specific to the handler.
Please refer to the ChannelEvent
and ChannelPipeline
to find
out what a upstream event and a downstream event are, what fundamental
differences they have, and how they flow in a pipeline.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |