public class HTTPRequestHeader
extends java.lang.Object
Constructor | Description |
---|---|
HTTPRequestHeader(java.lang.String requestHeader) |
This parses an http request string and creates an Immutable
HTTPRequest object for it. |
HTTPRequestHeader(java.lang.String requestMethod,
java.lang.String requestPath,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> requestQuery,
java.lang.String httpVersion) |
Creates a new Immutable
HTTPRequest object from the parts that are in a request. |
HTTPRequestHeader(HTTPRequestMethod requestMethod,
java.lang.String requestPath,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> requestQuery,
java.lang.String httpVersion) |
Creates a new Immutable
HTTPRequest object from the parts that are in a request. |
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(java.lang.Object o) |
|
java.nio.ByteBuffer |
getByteBuffer() |
Returns the header as a read-only
ByteBuffer . |
java.lang.String |
getHttpVersion() |
Gets the http version.
|
java.lang.String |
getRequestMethod() |
Gets the http request method (ie POST, GET, HEAD, etc).
|
java.lang.String |
getRequestPath() |
Gets the requestPath set in this request.
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getRequestQuery() |
Gets the request query.
|
java.lang.String |
getRequestQueryValue(java.lang.String paramKey) |
Gets the value to a given query parameter.
|
int |
hashCode() |
|
int |
length() |
The length in bytes of the http request header.
|
java.lang.String |
toString() |
public HTTPRequestHeader(java.lang.String requestHeader)
HTTPRequest
object for it.requestHeader
- the string to parse into a HTTPRequest
.java.lang.IllegalArgumentException
- If the header fails to parse.public HTTPRequestHeader(HTTPRequestMethod requestMethod, java.lang.String requestPath, java.util.Map<java.lang.String,java.util.List<java.lang.String>> requestQuery, java.lang.String httpVersion)
HTTPRequest
object from the parts that are in a request.requestMethod
- the HTTPRequestMethod
to set.requestPath
- the HTTPRequestMethod
to set.requestQuery
- the query to set.httpVersion
- the httpVersion to set.public HTTPRequestHeader(java.lang.String requestMethod, java.lang.String requestPath, java.util.Map<java.lang.String,java.util.List<java.lang.String>> requestQuery, java.lang.String httpVersion)
HTTPRequest
object from the parts that are in a request.
This can take non-standard request methods.requestMethod
- the HTTPRequestMethod
to set.requestPath
- the HTTPRequestMethod
to set.requestQuery
- the query to set.httpVersion
- the httpVersion to set.public java.lang.String getRequestMethod()
public java.lang.String getRequestPath()
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getRequestQuery()
public java.lang.String getRequestQueryValue(java.lang.String paramKey)
null
if none is associatedpublic java.lang.String getHttpVersion()
public java.nio.ByteBuffer getByteBuffer()
ByteBuffer
.
The newline/carriage return is not included!ByteBuffer
of the request header.public int length()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object