public class DefaultHttpRequest extends DefaultHttpMessage implements HttpRequest
HttpRequest implementation.| Modifier and Type | Field and Description |
|---|---|
private static int |
HASH_CODE_PRIME |
private HttpMethod |
method |
private java.lang.String |
uri |
| Constructor and Description |
|---|
DefaultHttpRequest(HttpVersion httpVersion,
HttpMethod method,
java.lang.String uri)
Creates a new instance.
|
DefaultHttpRequest(HttpVersion httpVersion,
HttpMethod method,
java.lang.String uri,
boolean validateHeaders)
Creates a new instance.
|
DefaultHttpRequest(HttpVersion httpVersion,
HttpMethod method,
java.lang.String uri,
HttpHeaders headers)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
HttpMethod |
getMethod()
Deprecated.
|
java.lang.String |
getUri()
Deprecated.
|
int |
hashCode() |
HttpMethod |
method()
Returns the
HttpMethod of this HttpRequest. |
HttpRequest |
setMethod(HttpMethod method)
Set the
HttpMethod of this HttpRequest. |
HttpRequest |
setProtocolVersion(HttpVersion version)
Set the protocol version of this
HttpMessage |
HttpRequest |
setUri(java.lang.String uri)
Set the requested URI (or alternatively, path)
|
java.lang.String |
toString() |
java.lang.String |
uri()
Returns the requested URI (or alternatively, path)
|
getProtocolVersion, headers, protocolVersiondecoderResult, getDecoderResult, setDecoderResultclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetProtocolVersion, headers, protocolVersiongetDecoderResultdecoderResult, setDecoderResultprivate static final int HASH_CODE_PRIME
private HttpMethod method
private java.lang.String uri
public DefaultHttpRequest(HttpVersion httpVersion, HttpMethod method, java.lang.String uri)
httpVersion - the HTTP version of the requestmethod - the HTTP method of the requesturi - the URI or path of the requestpublic DefaultHttpRequest(HttpVersion httpVersion, HttpMethod method, java.lang.String uri, boolean validateHeaders)
httpVersion - the HTTP version of the requestmethod - the HTTP method of the requesturi - the URI or path of the requestvalidateHeaders - validate the header names and values when adding them to the HttpHeaderspublic DefaultHttpRequest(HttpVersion httpVersion, HttpMethod method, java.lang.String uri, HttpHeaders headers)
httpVersion - the HTTP version of the requestmethod - the HTTP method of the requesturi - the URI or path of the requestheaders - the Headers for this Request@Deprecated public HttpMethod getMethod()
getMethod in interface HttpRequestpublic HttpMethod method()
HttpRequestHttpMethod of this HttpRequest.method in interface HttpRequestHttpMethod of this HttpRequest@Deprecated public java.lang.String getUri()
getUri in interface HttpRequestpublic java.lang.String uri()
HttpRequesturi in interface HttpRequestpublic HttpRequest setMethod(HttpMethod method)
HttpRequestHttpMethod of this HttpRequest.setMethod in interface HttpRequestpublic HttpRequest setUri(java.lang.String uri)
HttpRequestsetUri in interface HttpRequestpublic HttpRequest setProtocolVersion(HttpVersion version)
HttpMessageHttpMessagesetProtocolVersion in interface HttpMessagesetProtocolVersion in interface HttpRequestsetProtocolVersion in class DefaultHttpMessagepublic int hashCode()
hashCode in class DefaultHttpMessagepublic boolean equals(java.lang.Object o)
equals in class DefaultHttpMessagepublic java.lang.String toString()
toString in class java.lang.Object