public final class FullHttpRequestImpl extends Object implements FullHttpRequest
| Constructor and Description |
|---|
FullHttpRequestImpl()
Creates a new HTTP request object with no parameters set.
|
FullHttpRequestImpl(FullHttpRequest request)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
FullHttpRequestImpl |
content(byte[] content)
Sets content of message body for request.
|
FullHttpRequestImpl |
domain(String domain)
Sets host for request.
|
boolean |
equals(Object obj) |
byte[] |
getContent()
Get content for request.
|
String |
getDomain()
Gets domain / host for request.
|
Set<HttpMessageHeader> |
getHttpMessageHeaders()
Get http message headers.
|
Set<HttpMessageHeader> |
getHttpMessageHeaders(String name)
Get http message headers with given name/key.
|
Method |
getMethod()
Gets method for request.
|
String |
getPath()
Gets path for request without query parameters.
|
Integer |
getPort()
Gets port for request.
|
Set<QueryParameter> |
getQueryParameters()
Gets query parameters for request.
|
Set<QueryParameter> |
getQueryParameters(String key)
Gets query parameters with given key.
|
String |
getUrl()
Gets the url for the http request, including query parameters if defined.
|
int |
hashCode() |
FullHttpRequestImpl |
httpMessageHeader(String name,
String value)
Adds a Http message header.
|
FullHttpRequestImpl |
method(Method method)
Sets method for request.
|
FullHttpRequestImpl |
path(String path)
Sets path for request.
|
FullHttpRequestImpl |
port(Integer port)
Sets port for request.
|
FullHttpRequestImpl |
queryParameter(String key,
String value)
Adds a query parameter for request.
|
String |
toString() |
public FullHttpRequestImpl()
public FullHttpRequestImpl(FullHttpRequest request)
request - Will copy properties from this request.public FullHttpRequestImpl method(Method method)
method - Method for request.public FullHttpRequestImpl httpMessageHeader(String name, String value)
name - header name. Should not be null or blank.value - header value. Should not be null or blank.public FullHttpRequestImpl content(byte[] content)
content - Message body for request.public FullHttpRequestImpl domain(String domain)
domain - Sets domain / host for request.public FullHttpRequestImpl port(Integer port)
port - Sets port for request.public FullHttpRequestImpl path(String path)
path - Sets path for request.public FullHttpRequestImpl queryParameter(String key, String value)
key - Parameter key. Should not be empty or null.value - Parameter value. Should not be empty or nullpublic Method getMethod()
getMethod in interface HttpRequestpublic byte[] getContent()
getContent in interface HttpRequestpublic String getDomain()
getDomain in interface FullHttpRequestpublic Integer getPort()
getPort in interface FullHttpRequestpublic String getPath()
getPath in interface HttpRequestpublic Set<QueryParameter> getQueryParameters()
getQueryParameters in interface HttpRequestpublic Set<HttpMessageHeader> getHttpMessageHeaders()
getHttpMessageHeaders in interface HttpRequestpublic Set<QueryParameter> getQueryParameters(String key)
getQueryParameters in interface HttpRequestkey - Query parameter key. Should not be null or blank.public Set<HttpMessageHeader> getHttpMessageHeaders(String name)
getHttpMessageHeaders in interface HttpRequestname - Name/key. Should not be null or blank.public String getUrl()
getUrl in interface FullHttpRequestCopyright © 2014. All Rights Reserved.