T
- The message typepublic interface MessageEncoder<T>
We didn't provide any dispose method for MessageEncoder
because it can give you performance penalty in case you have a lot of
message types to handle.
DemuxingProtocolEncoder
,
MessageEncoderFactory
Modifier and Type | Method and Description |
---|---|
void |
encode(IoSession session,
T message,
ProtocolEncoderOutput out)
Encodes higher-level message objects into binary or protocol-specific data.
|
void encode(IoSession session, T message, ProtocolEncoderOutput out) throws Exception
encode(IoSession, Object, ProtocolEncoderOutput)
method with message which is popped from the session write queue, and then
the encoder implementation puts encoded IoBuffer
s into
ProtocolEncoderOutput
.session
- The current sessionmessage
- The message to encodeout
- The instance of ProtocolEncoderOutput
that will receive the encoded messageException
- if the message violated protocol specificationCopyright © 2004–2021 Apache MINA Project. All rights reserved.