public class HttpServerDecoder extends Object implements ProtocolDecoder<ByteBuffer,HttpPdu,HttpDecoderState>
Modifier and Type | Field and Description |
---|---|
static Pattern |
COOKIE_SEPARATOR_PATTERN
Regex to split cookie header following RFC6265 Section 5.4
|
static Pattern |
HEADER_VALUE_PATTERN
Regex to parse header name and value
|
static Pattern |
HEADERS_BODY_PATTERN
Regex to parse raw headers from body
|
static Pattern |
KEY_VALUE_PATTERN
Regex to parse out key/value pairs
|
static Pattern |
PARAM_STRING_PATTERN
Regex to parse out parameters from query string
|
static Pattern |
QUERY_STRING_PATTERN
Regex to parse out QueryString from HttpRequest
|
static Pattern |
RAW_VALUE_PATTERN
Regex to parse raw headers and body
|
static Pattern |
REQUEST_LINE_PATTERN
Regex to parse HttpRequest Request Line
|
Constructor and Description |
---|
HttpServerDecoder() |
Modifier and Type | Method and Description |
---|---|
HttpDecoderState |
createDecoderState()
Create a new session context for this decoder
|
HttpPdu |
decode(ByteBuffer msg,
HttpDecoderState context)
Decode binary or protocol-specific content of type
INPUT into higher-level protocol message objects,
of type OUTPUT |
void |
finishDecode(HttpDecoderState context)
Finish decoding, for example if the decoder accumulated some unused input, it should discard it, or throw an
Exception
|
public static final Pattern REQUEST_LINE_PATTERN
public static final Pattern QUERY_STRING_PATTERN
public static final Pattern PARAM_STRING_PATTERN
public static final Pattern KEY_VALUE_PATTERN
public static final Pattern RAW_VALUE_PATTERN
public static final Pattern HEADERS_BODY_PATTERN
public static final Pattern HEADER_VALUE_PATTERN
public static final Pattern COOKIE_SEPARATOR_PATTERN
public HttpDecoderState createDecoderState()
createDecoderState
in interface ProtocolDecoder<ByteBuffer,HttpPdu,HttpDecoderState>
public HttpPdu decode(ByteBuffer msg, HttpDecoderState context)
INPUT
into higher-level protocol message objects,
of type OUTPUTdecode
in interface ProtocolDecoder<ByteBuffer,HttpPdu,HttpDecoderState>
msg
- the received message to decodecontext
- the decoding context (will be stored in the session for the next decode call)null
if nothing was decodedpublic void finishDecode(HttpDecoderState context)
finishDecode
in interface ProtocolDecoder<ByteBuffer,HttpPdu,HttpDecoderState>
Copyright © 2009–2013 Apache MINA Project. All rights reserved.