Interface MessageEncoder
public interface MessageEncoder
Encodes messages of specific types specified by
getMessageTypes()
.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
encode
(IoSession session, Object message, ProtocolEncoderOutput out) Encodes higher-level message objects into binary or protocol-specific data.Returns the set of message classes this encoder can encode.
-
Method Details
-
getMessageTypes
Returns the set of message classes this encoder can encode. -
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 encodedByteBuffer
s intoProtocolEncoderOutput
.- Throws:
Exception
- if the message violated protocol specification
-