public interface ProtocolEncoder
encode(IoSession, Object, ProtocolEncoderOutput)
method with message which is popped from the session write queue, and then
the encoder implementation puts encoded ByteBuffer
s into
ProtocolEncoderOutput
by calling
ProtocolEncoderOutput.write(ByteBuffer)
.
Please refer to
TextLineEncoder
example.
Modifier and Type | Method and Description |
---|---|
void |
dispose(IoSession session)
Releases all resources related with this encoder.
|
void |
encode(IoSession session,
java.lang.Object message,
ProtocolEncoderOutput out)
Encodes higher-level message objects into binary or protocol-specific data.
|
void encode(IoSession session, java.lang.Object message, ProtocolEncoderOutput out) throws java.lang.Exception
encode(IoSession, Object, ProtocolEncoderOutput)
method with message which is popped from the session write queue, and then
the encoder implementation puts encoded ByteBuffer
s into
ProtocolEncoderOutput
.java.lang.Exception
- if the message violated protocol specificationvoid dispose(IoSession session) throws java.lang.Exception
java.lang.Exception
- if failed to dispose all resourcesCopyright © 2004-2019 Apache MINA Project. All Rights Reserved.