Interface MessageEncoder
-
public interface MessageEncoderEncodes messages of specific types specified bygetMessageTypes().
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidencode(IoSession session, java.lang.Object message, ProtocolEncoderOutput out)Encodes higher-level message objects into binary or protocol-specific data.java.util.Set<java.lang.Class<?>>getMessageTypes()Returns the set of message classes this encoder can encode.
-
-
-
Method Detail
-
getMessageTypes
java.util.Set<java.lang.Class<?>> getMessageTypes()
Returns the set of message classes this encoder can encode.
-
encode
void encode(IoSession session, java.lang.Object message, ProtocolEncoderOutput out) throws java.lang.Exception
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:
java.lang.Exception- if the message violated protocol specification
-
-