Interface MessageEncoder
public interface MessageEncoder
Encodes messages of specific types specified by
getMessageTypes().-
Method Summary
Modifier and TypeMethodDescriptionvoidencode(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 encodedByteBuffers intoProtocolEncoderOutput.- Throws:
Exception- if the message violated protocol specification
-