public class HttpRequestImpl extends Object implements HttpRequest
| Constructor and Description |
|---|
HttpRequestImpl(HttpVersion version,
HttpMethod method,
String requestedPath,
String queryString,
Map<String,String> headers) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsHeader(String name)
Returns true if the HTTP header with the specified name exists in this request.
|
boolean |
containsParameter(String name)
Determines whether this request contains at least one parameter with the specified name
|
String |
getContentType()
Gets the Content-Type header of the message.
|
String |
getHeader(String name)
Returns the value of the HTTP header with the specified name.
|
Map<String,String> |
getHeaders()
|
HttpMethod |
getMethod()
Return the HTTP method used for this message
HttpMethod |
String |
getParameter(String name)
Returns the value of a request parameter as a String, or null if the parameter does not exist.
|
Map<String,List<String>> |
getParameters()
|
HttpVersion |
getProtocolVersion()
The HTTP version of the message
|
String |
getQueryString() |
String |
getRequestPath()
Retrurn the HTTP request path
|
boolean |
isKeepAlive()
Returns true if this message enables keep-alive connection.
|
protected Matcher |
parameterPattern(String name) |
String |
toString() |
public HttpRequestImpl(HttpVersion version, HttpMethod method, String requestedPath, String queryString, Map<String,String> headers)
public HttpVersion getProtocolVersion()
HttpMessagegetProtocolVersion in interface HttpMessagepublic String getContentType()
HttpMessagegetContentType in interface HttpMessagepublic boolean isKeepAlive()
HttpMessageisKeepAlive in interface HttpMessagepublic String getHeader(String name)
HttpMessagegetHeader in interface HttpMessagename - The name of the desired headerpublic boolean containsHeader(String name)
HttpMessagecontainsHeader in interface HttpMessagepublic Map<String,String> getHeaders()
HttpMessagegetHeaders in interface HttpMessagepublic boolean containsParameter(String name)
HttpRequestcontainsParameter in interface HttpRequestname - The parameter nametrue if this request contains at least one parameter with the specified namepublic String getParameter(String name)
HttpRequestgetParameter in interface HttpRequestname - The parameter namepublic Map<String,List<String>> getParameters()
HttpRequestMap of query parameters whose key is a String and whose value is a
List of Strings.getParameters in interface HttpRequestpublic String getQueryString()
getQueryString in interface HttpRequestpublic HttpMethod getMethod()
HttpRequestHttpMethodgetMethod in interface HttpRequestpublic String getRequestPath()
HttpRequestgetRequestPath in interface HttpRequestCopyright © 2004–2017 Apache MINA Project. All rights reserved.