public interface ProtocolEncoder
encode(ProtocolSession, 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 |
encode(ProtocolSession session,
java.lang.Object message,
ProtocolEncoderOutput out)
Encodes higher-level message objects into binary or protocol-specific data.
|
void encode(ProtocolSession session, java.lang.Object message, ProtocolEncoderOutput out) throws ProtocolViolationException
encode(ProtocolSession, Object, ProtocolEncoderOutput)
method with message which is popped from the session write queue, and then
the encoder implementation puts encoded ByteBuffer
s into
ProtocolEncoderOutput
.ProtocolViolationException
- if the message violated protocol
specification