public interface MessageDecoder
DemuxingProtocolCodecFactory
,
MessageDecoderFactory
Modifier and Type | Field and Description |
---|---|
static MessageDecoderResult |
NEED_DATA
Represents a result from
decodable(IoSession, ByteBuffer) and
decode(IoSession, ByteBuffer, ProtocolDecoderOutput) . |
static MessageDecoderResult |
NOT_OK
Represents a result from
decodable(IoSession, ByteBuffer) and
decode(IoSession, ByteBuffer, ProtocolDecoderOutput) . |
static MessageDecoderResult |
OK
Represents a result from
decodable(IoSession, ByteBuffer) and
decode(IoSession, ByteBuffer, ProtocolDecoderOutput) . |
Modifier and Type | Method and Description |
---|---|
MessageDecoderResult |
decodable(IoSession session,
ByteBuffer in)
Checks the specified buffer is decodable by this decoder.
|
MessageDecoderResult |
decode(IoSession session,
ByteBuffer in,
ProtocolDecoderOutput out)
Decodes binary or protocol-specific content into higher-level message objects.
|
void |
finishDecode(IoSession session,
ProtocolDecoderOutput out)
Invoked when the specified session is closed while this decoder was
parsing the data.
|
static final MessageDecoderResult OK
decodable(IoSession, ByteBuffer)
and
decode(IoSession, ByteBuffer, ProtocolDecoderOutput)
. Please
refer to each method's documentation for detailed explanation.static final MessageDecoderResult NEED_DATA
decodable(IoSession, ByteBuffer)
and
decode(IoSession, ByteBuffer, ProtocolDecoderOutput)
. Please
refer to each method's documentation for detailed explanation.static final MessageDecoderResult NOT_OK
decodable(IoSession, ByteBuffer)
and
decode(IoSession, ByteBuffer, ProtocolDecoderOutput)
. Please
refer to each method's documentation for detailed explanation.MessageDecoderResult decodable(IoSession session, ByteBuffer in)
MessageDecoderResult 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
.void 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 specificationCopyright © 2004-2019 Apache MINA Project. All Rights Reserved.