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 messages (typically IoBuffer
s)
into ProtocolEncoderOutput
by calling ProtocolEncoderOutput.write(Object)
.
Please refer to
TextLineEncoder
example.
ProtocolEncoderException
Modifier and Type | Method and Description |
---|---|
void |
dispose(IoSession session)
Releases all resources related with this encoder.
|
void |
encode(IoSession session,
Object message,
ProtocolEncoderOutput out)
Encodes higher-level message objects into binary or protocol-specific data.
|
void encode(IoSession session, Object message, ProtocolEncoderOutput out) throws Exception
encode(IoSession, Object, ProtocolEncoderOutput)
method with message which is popped from the session write queue, and then
the encoder implementation puts encoded messages (typically IoBuffer
s)
into ProtocolEncoderOutput
.session
- The current Sessionmessage
- the message to encodeout
- The ProtocolEncoderOutput
that will receive the encoded messageException
- if the message violated protocol specificationCopyright © 2004–2022 Apache MINA Project. All rights reserved.