T
- The type of HttpRequest
.public class DefaultHttpRequestParser<T extends HttpRequest> extends AbstractMessageParser<T>
NHttpMessageParser
implementation for HttpRequest
s.Constructor and Description |
---|
DefaultHttpRequestParser(Http1Config http1Config,
HttpRequestFactory<T> requestFactory) |
DefaultHttpRequestParser(Http1Config http1Config,
LineParser parser,
HttpRequestFactory<T> requestFactory) |
DefaultHttpRequestParser(HttpRequestFactory<T> requestFactory) |
DefaultHttpRequestParser(HttpRequestFactory<T> requestFactory,
Http1Config http1Config)
Deprecated.
|
DefaultHttpRequestParser(HttpRequestFactory<T> requestFactory,
LineParser parser,
Http1Config http1Config)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected T |
createMessage(CharArrayBuffer buffer)
Creates
HttpMessage instance based on the content of the input
buffer containing the first line of the incoming HTTP message. |
T |
parse(SessionInputBuffer sessionBuffer,
boolean endOfStream)
Attempts to parse a complete message head from the content of the
internal buffer.
|
reset
public DefaultHttpRequestParser(Http1Config http1Config, LineParser parser, HttpRequestFactory<T> requestFactory)
public DefaultHttpRequestParser(Http1Config http1Config, HttpRequestFactory<T> requestFactory)
@Deprecated public DefaultHttpRequestParser(HttpRequestFactory<T> requestFactory, Http1Config http1Config)
DefaultHttpRequestParser(Http1Config, HttpRequestFactory)
}@Deprecated public DefaultHttpRequestParser(HttpRequestFactory<T> requestFactory, LineParser parser, Http1Config http1Config)
DefaultHttpRequestParser(Http1Config, LineParser, HttpRequestFactory)
}public DefaultHttpRequestParser(HttpRequestFactory<T> requestFactory)
public T parse(SessionInputBuffer sessionBuffer, boolean endOfStream) throws IOException, HttpException
NHttpMessageParser
null
.parse
in interface NHttpMessageParser<T extends HttpRequest>
parse
in class AbstractMessageParser<T extends HttpRequest>
sessionBuffer
- session input buffer.endOfStream
- end of stream flagnull
otherwise.IOException
- in case of an I/O error.HttpException
- in case the HTTP message is malformed or
violates the HTTP protocol.protected T createMessage(CharArrayBuffer buffer) throws HttpException
AbstractMessageParser
HttpMessage
instance based on the content of the input
buffer containing the first line of the incoming HTTP message.createMessage
in class AbstractMessageParser<T extends HttpRequest>
buffer
- the line buffer.HttpException
- in case of HTTP protocol violationCopyright © 2005–2021 The Apache Software Foundation. All rights reserved.