Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
public interface MessageDecoder
Field Summary | |
static MessageDecoderResult |
|
static MessageDecoderResult |
|
static MessageDecoderResult |
|
Method Summary | |
MessageDecoderResult |
|
MessageDecoderResult |
|
void |
|
public static final MessageDecoderResult NEED_DATA
Represents a result fromdecodable(IoSession,ByteBuffer)
anddecode(IoSession,ByteBuffer,ProtocolDecoderOutput)
. Please refer to each method's documentation for detailed explanation.
public static final MessageDecoderResult NOT_OK
Represents a result fromdecodable(IoSession,ByteBuffer)
anddecode(IoSession,ByteBuffer,ProtocolDecoderOutput)
. Please refer to each method's documentation for detailed explanation.
public static final MessageDecoderResult OK
Represents a result fromdecodable(IoSession,ByteBuffer)
anddecode(IoSession,ByteBuffer,ProtocolDecoderOutput)
. Please refer to each method's documentation for detailed explanation.
public MessageDecoderResult decodable(IoSession session, ByteBuffer in)
Checks the specified buffer is decodable by this decoder.
public MessageDecoderResult decode(IoSession session, ByteBuffer in, ProtocolDecoderOutput out) throws Exception
Decodes binary or protocol-specific content into higher-level message objects. MINA invokesdecode(IoSession,ByteBuffer,ProtocolDecoderOutput)
method with read data, and then the decoder implementation puts decoded messages intoProtocolDecoderOutput
.
public void finishDecode(IoSession session, ProtocolDecoderOutput out) throws Exception
Invoked when the specified session is closed while this decoder was parsing the data. This method is useful when you deal with the protocol which doesn't specify the length of a message such as HTTP response without content-length header. Implement this method to process the remaining data thatdecode(IoSession,ByteBuffer,ProtocolDecoderOutput)
method didn't process completely.