I
- the type of the accepted inbound objectsO
- the type of the produced outbound objectspublic abstract class EventDrivenCompoundDecoder<I,O> extends CompoundDecoder<I,O> implements IEventDrivenCodec
Constructor and Description |
---|
EventDrivenCompoundDecoder(IDecoder<?,?>... decoders)
Constructs an event driven compound decoder with a chain of the specified
decoders.
|
Modifier and Type | Method and Description |
---|---|
void |
added(ISession session,
ICodecPipeline pipeline)
Signals that the codec has been added to the pipeline associated with a
session.
|
void |
event(ISession session,
SessionEvent event)
Signals a session event to the codec.
|
void |
removed(ISession session,
ICodecPipeline pipeline)
Signals that the codec has been removed from the pipeline associated with a
session.
|
decode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInboundType, getOutboundType
public EventDrivenCompoundDecoder(IDecoder<?,?>... decoders)
The decoder chain is organized in the following way:
{data} -> decoder1 -> decoder2 -> ... -> decoderN -> {out}
decoders
- the chain of decodersIllegalArgumentException
- if the specified decoders have incompatible inbound or
outbound typesIllegalStateException
- if the param O is Void
public void added(ISession session, ICodecPipeline pipeline)
IEventDrivenCodec
added
in interface IEventDrivenCodec
session
- the session the pipeline is associated withpipeline
- the pipeline the codec has been added topublic void event(ISession session, SessionEvent event)
IEventDrivenCodec
event
in interface IEventDrivenCodec
session
- the session which state is changingevent
- the session eventpublic void removed(ISession session, ICodecPipeline pipeline)
IEventDrivenCodec
removed
in interface IEventDrivenCodec
session
- the session the pipeline is associated withpipeline
- the pipeline the codec has been removed fromCopyright © 2017–2022 SNF4J.ORG. All rights reserved.