| Constructor and Description |
|---|
PerMessageDeflateEncoder(int compressionLevel,
boolean noContext)
Constructs a per-message deflate encoder with specified compression level and
the context takeover control.
|
| 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 |
encode(ISession session,
Frame frame,
List<Frame> out)
Encodes data from one type to another one.
|
void |
event(ISession session,
SessionEvent event)
Signals a session event to the codec.
|
Class<Frame> |
getInboundType()
Returns the type of the accepted inbound objects.
|
Class<Frame> |
getOutboundType()
Returns the type of the produced outbound objects.
|
void |
removed(ISession session,
ICodecPipeline pipeline)
Signals that the codec has been removed from the pipeline associated with a
session.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetInboundType, getOutboundTypeadded, event, removedpublic PerMessageDeflateEncoder(int compressionLevel,
boolean noContext)
compressionLevel - the compression level (0-9)noContext - true to prevent from using the context
takeoverpublic void encode(ISession session, Frame frame, List<Frame> out) throws Exception
IEncoder
Encoders that do not produce an output (i.e. the O parameter is
Void) cannot change the object passed as the data
argument. They should not also store it for future use as its state can
be changed.
The above limitations regarding the data argument do not apply to
encoders that produce an output.
public Class<Frame> getInboundType()
ICodecgetInboundType in interface ICodec<Frame,Frame>public Class<Frame> getOutboundType()
ICodecgetOutboundType in interface ICodec<Frame,Frame>public void added(ISession session, ICodecPipeline pipeline)
IEventDrivenCodecadded in interface IEventDrivenCodecsession - the session the pipeline is associated withpipeline - the pipeline the codec has been added topublic void event(ISession session, SessionEvent event)
IEventDrivenCodecevent in interface IEventDrivenCodecsession - the session which state is changingevent - the session eventpublic void removed(ISession session, ICodecPipeline pipeline)
IEventDrivenCodecremoved in interface IEventDrivenCodecsession - the session the pipeline is associated withpipeline - the pipeline the codec has been removed fromCopyright © 2017–2022 SNF4J.ORG. All rights reserved.