I
- the type of the accepted inbound objectsO
- the type of the produced outbound objectspublic abstract class EventDrivenCompoundEncoder<I,O> extends CompoundEncoder<I,O> implements IEventDrivenCodec
Constructor and Description |
---|
EventDrivenCompoundEncoder(IEncoder<?,?>... encoders)
Constructs an event driven compound encoder with a chain of the specified
encoders.
|
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.
|
encode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInboundType, getOutboundType
public EventDrivenCompoundEncoder(IEncoder<?,?>... encoders)
The encoder chain is organized in the following way:
{data} -> encoder1 -> encoder2 -> ... -> encoderN -> {out}
encoders
- the chain of encodersIllegalArgumentException
- if the specified encoders 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.