public interface ProtocolDecoder
decode(IoSession, ByteBuffer, 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.
Modifier and Type | Method and Description |
---|---|
void |
decode(IoSession session,
ByteBuffer 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, ByteBuffer in, ProtocolDecoderOutput out) throws java.lang.Exception
decode(IoSession, ByteBuffer, ProtocolDecoderOutput)
method with read data, and then the decoder implementation puts decoded
messages into ProtocolDecoderOutput
.java.lang.Exception
- if the read data violated protocol specificationvoid finishDecode(IoSession session, ProtocolDecoderOutput out) throws java.lang.Exception
decode(IoSession, ByteBuffer, ProtocolDecoderOutput)
method didn't process completely.java.lang.Exception
- if the read data violated protocol specificationvoid dispose(IoSession session) throws java.lang.Exception
java.lang.Exception
- if failed to dispose all resourcesCopyright © 2004-2019 Apache MINA Project. All Rights Reserved.