public class ProtocolEncoderImpl extends Object implements ProtocolEncoder
| Constructor and Description |
|---|
ProtocolEncoderImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected IoBuffer |
createMessage(IoSession session,
byte command,
boolean longMessage) |
void |
dispose(IoSession session)
Releases all resources related with this encoder.
|
void |
encode(IoSession session,
Object message,
ProtocolEncoderOutput out)
Encodes higher-level message objects into binary or protocol-specific data.
|
public void dispose(IoSession session) throws Exception
ProtocolEncoderdispose in interface ProtocolEncoderException - if failed to dispose all resourcesprotected IoBuffer createMessage(IoSession session, byte command, boolean longMessage)
public void encode(IoSession session, Object message, ProtocolEncoderOutput out) throws Exception
ProtocolEncoderProtocolEncoder.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.encode in interface ProtocolEncoderException - if the message violated protocol specification