public class HttpClientDecoder extends java.lang.Object implements ProtocolDecoder
| 限定符和类型 | 字段和说明 |
|---|---|
static java.util.regex.Pattern |
COOKIE_SEPARATOR_PATTERN
Regex to split cookie header following RFC6265 Section 5.4
|
static java.util.regex.Pattern |
HEADER_VALUE_PATTERN
Regex to parse header name and value
|
static java.util.regex.Pattern |
HEADERS_BODY_PATTERN
Regex to parse raw headers from body
|
static java.util.regex.Pattern |
KEY_VALUE_PATTERN
Regex to parse out key/value pairs
|
static java.util.regex.Pattern |
PARAM_STRING_PATTERN
Regex to parse out parameters from query string
|
static java.util.regex.Pattern |
QUERY_STRING_PATTERN
Regex to parse out QueryString from HttpRequest
|
static java.util.regex.Pattern |
RAW_VALUE_PATTERN
Regex to parse raw headers and body
|
static java.util.regex.Pattern |
REQUEST_LINE_PATTERN
Regex to parse HttpRequest Request Line
|
static java.util.regex.Pattern |
RESPONSE_LINE_PATTERN
Regex to parse HttpRequest Request Line
|
| 构造器和说明 |
|---|
HttpClientDecoder() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
decode(IoSession session,
IoBuffer msg,
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.
|
public static final java.util.regex.Pattern REQUEST_LINE_PATTERN
public static final java.util.regex.Pattern RESPONSE_LINE_PATTERN
public static final java.util.regex.Pattern QUERY_STRING_PATTERN
public static final java.util.regex.Pattern PARAM_STRING_PATTERN
public static final java.util.regex.Pattern KEY_VALUE_PATTERN
public static final java.util.regex.Pattern RAW_VALUE_PATTERN
public static final java.util.regex.Pattern HEADERS_BODY_PATTERN
public static final java.util.regex.Pattern HEADER_VALUE_PATTERN
public static final java.util.regex.Pattern COOKIE_SEPARATOR_PATTERN
public void decode(IoSession session, IoBuffer msg, ProtocolDecoderOutput out)
ProtocolDecoderProtocolDecoder.decode(IoSession, IoBuffer, ProtocolDecoderOutput)
method with read data, and then the decoder implementation puts decoded
messages into ProtocolDecoderOutput.decode 在接口中 ProtocolDecodersession - The current Sessionmsg - the buffer to decodeout - The ProtocolDecoderOutput that will receive the decoded messagepublic void finishDecode(IoSession session, ProtocolDecoderOutput out) throws java.lang.Exception
ProtocolDecoderProtocolDecoder.decode(IoSession, IoBuffer, ProtocolDecoderOutput)
method didn't process completely.finishDecode 在接口中 ProtocolDecodersession - The current Sessionout - The ProtocolDecoderOutput that contains the decoded messagejava.lang.Exception - if the read data violated protocol specificationpublic void dispose(IoSession session) throws java.lang.Exception
ProtocolDecoderdispose 在接口中 ProtocolDecodersession - The current Sessionjava.lang.Exception - if failed to dispose all resources