Interface ProtocolEncoder
- All Known Implementing Classes:
DemuxingProtocolEncoder, HttpClientEncoder, HttpServerEncoder, ObjectSerializationEncoder, PrefixedStringEncoder, ProtocolEncoderAdapter, SynchronizedProtocolEncoder, TextLineEncoder
public interface ProtocolEncoder
Encodes higher-level message objects into binary or protocol-specific data.
MINA invokes
encode(IoSession, Object, ProtocolEncoderOutput)
method with message which is popped from the session write queue, and then
the encoder implementation puts encoded messages (typically IoBuffers)
into ProtocolEncoderOutput by calling ProtocolEncoderOutput.write(Object).
Please refer to
TextLineEncoder
example.
- See Also:
-
Method Summary
-
Method Details
-
encode
Encodes higher-level message objects into binary or protocol-specific data. MINA invokesencode(IoSession, Object, ProtocolEncoderOutput)method with message which is popped from the session write queue, and then the encoder implementation puts encoded messages (typicallyIoBuffers) intoProtocolEncoderOutput.- Parameters:
session- The current Sessionmessage- the message to encodeout- TheProtocolEncoderOutputthat will receive the encoded message- Throws:
Exception- if the message violated protocol specification
-
dispose
-