public class HttpRequestDecoder extends MessageDecoderAdapter
MessageDecoder
that decodes HttpRequest
.NEED_DATA, NOT_OK, OK
构造器和说明 |
---|
HttpRequestDecoder() |
限定符和类型 | 方法和说明 |
---|---|
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.
|
finishDecode
public MessageDecoderResult decodable(IoSession session, ByteBuffer in)
MessageDecoder
MessageDecoder.OK
if this decoder can decode the specified buffer.
MessageDecoder.NOT_OK
if this decoder cannot decode the specified buffer.
MessageDecoder.NEED_DATA
if more data is required to determine if the
specified buffer is decodable (MessageDecoder.OK
) or not decodable
MessageDecoder.NOT_OK
.public MessageDecoderResult decode(IoSession session, ByteBuffer in, ProtocolDecoderOutput out) throws java.lang.Exception
MessageDecoder
MessageDecoder.decode(IoSession, ByteBuffer, ProtocolDecoderOutput)
method with read data, and then the decoder implementation puts decoded
messages into ProtocolDecoderOutput
.MessageDecoder.OK
if you finished decoding messages successfully.
MessageDecoder.NEED_DATA
if you need more data to finish decoding current message.
MessageDecoder.NOT_OK
if you cannot decode current message due to protocol specification violation.java.lang.Exception
- if the read data violated protocol specification