public interface ProtocolDecoder
decode(IoSession, IoBuffer, ProtocolDecoderOutput)
method with read data, and then the decoder implementation puts decoded
messages into ProtocolDecoderOutput by calling
ProtocolDecoderOutput.write(Object).
Please refer to
TextLineDecoder
example.
ProtocolDecoderException| Modifier and Type | Method and Description |
|---|---|
void |
decode(IoSession session,
IoBuffer in,
ProtocolDecoderOutput out)
Decodes binary or protocol-specific content into higher-level message objects.
|
void |
dispose(IoSession session)
Releases all resources related with this decoder.
|
void |
finishDecode(IoSession session,
ProtocolDecoderOutput out)
Invoked when the specified session is closed.
|
void decode(IoSession session, IoBuffer in, ProtocolDecoderOutput out) throws Exception
decode(IoSession, IoBuffer, ProtocolDecoderOutput)
method with read data, and then the decoder implementation puts decoded
messages into ProtocolDecoderOutput.Exception - if the read data violated protocol specificationvoid finishDecode(IoSession session, ProtocolDecoderOutput out) throws Exception
decode(IoSession, IoBuffer, ProtocolDecoderOutput)
method didn't process completely.Exception - if the read data violated protocol specification