|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectcn.dreampie.common.http.AbstractRequest
cn.dreampie.common.http.HttpRequest
public class HttpRequest
Date: 1/22/13 Time: 2:52 PM
| 构造方法摘要 | |
|---|---|
HttpRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.ServletContext servletContext)
|
|
| 方法摘要 | ||
|---|---|---|
protected String |
getBasePath()
The path on which resty is mounted. |
|
String |
getCharacterEncoding()
|
|
int |
getContentLength()
|
|
InputStream |
getContentStream()
|
|
String |
getContentType()
|
|
Map<String,String> |
getCookiesMap()
|
|
String |
getCookieValue(String cookieName)
|
|
String |
getHeader(String headerName)
|
|
Map<String,String> |
getHeaders()
|
|
Enumeration<String> |
getHeaders(String headerName)
|
|
String |
getHttpMethod()
HTTP METHOD, eg GET, POST, ... |
|
String |
getLocalClientAddress()
Returns the client address of this request, without taking proxy into account |
|
Locale |
getLocale()
Returns the preferred Locale that the client will
accept content in, based on the Accept-Language header. |
|
List<Locale> |
getLocales()
Returns an ImmutableList of Locale objects
indicating, in decreasing order starting with the preferred locale, the
locales that are acceptable to the client based on the Accept-Language
header. |
|
protected String |
getLocalScheme()
The URL scheme used for this request, without taking proxy into account. |
|
protected Map<String,String[]> |
getParamMap()
|
|
String |
getQueryParam(String param)
|
|
Map<String,List<String>> |
getQueryParams()
|
|
List<String> |
getQueryParams(String param)
|
|
String |
getQueryString()
|
|
String |
getRealPath(String path)
Returns the resty portion of the webRoot physical path. |
|
javax.servlet.RequestDispatcher |
getRequestDispatcher(String url)
|
|
String |
getRestPath()
Returns the resty portion of the request path. |
|
String |
getRestUri()
Returns the resty portion of the full request uri. |
|
boolean |
isPersistentCookie(String cookie)
|
|
void |
setCharacterEncoding(String encoding)
|
|
|
unwrap(Class<T> clazz)
Unwraps the underlying native implementation of given class. |
|
| 从类 cn.dreampie.common.http.AbstractRequest 继承的方法 |
|---|
checkProxyRequest, getBaseNetworkPath, getBaseUri, getClientAddress, getHost, getScheme, isSecured, toString |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 构造方法详细信息 |
|---|
public HttpRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.ServletContext servletContext)
| 方法详细信息 |
|---|
public String getLocalClientAddress()
AbstractRequest 复制的描述
AbstractRequest 中的 getLocalClientAddressprotected String getBasePath()
AbstractRequest 复制的描述
AbstractRequest 中的 getBasePathprotected String getLocalScheme()
AbstractRequest 复制的描述
AbstractRequest 中的 getLocalSchemepublic String getRestPath()
Request 复制的描述If incoming request is http://mydomain.com/api/myresource/test?q=test and baseUri is http://mydomain.com/api, then resty path will be /myresource/test
public String getRealPath(String path)
Request 复制的描述
path - webRoot relative path
public String getRestUri()
Request 复制的描述If incoming request is http://mydomain.com/api/myresource/test?q=test and baseUri is http://mydomain.com/api, then resty uri will be /myresource/test?q=test
public String getQueryParam(String param)
public List<String> getQueryParams(String param)
public Map<String,List<String>> getQueryParams()
protected Map<String,String[]> getParamMap()
public int getContentLength()
public InputStream getContentStream()
throws IOException
IOExceptionpublic String getHttpMethod()
Request 复制的描述
public Map<String,String> getCookiesMap()
public String getCookieValue(String cookieName)
public boolean isPersistentCookie(String cookie)
public String getQueryString()
AbstractRequest 中的 getQueryStringpublic javax.servlet.RequestDispatcher getRequestDispatcher(String url)
AbstractRequest 中的 getRequestDispatcherpublic String getHeader(String headerName)
public Enumeration<String> getHeaders(String headerName)
public Map<String,String> getHeaders()
public String getContentType()
public <T> T unwrap(Class<T> clazz)
Request 复制的描述
T - unwrapped classclazz - the class of the underlying implementation
public Locale getLocale()
Request 复制的描述Locale that the client will
accept content in, based on the Accept-Language header.
If the client request doesn't provide an Accept-Language header,
this method returns the default locale for the server.
Locale for the clientpublic List<Locale> getLocales()
Request 复制的描述ImmutableList of Locale objects
indicating, in decreasing order starting with the preferred locale, the
locales that are acceptable to the client based on the Accept-Language
header.
If the client request doesn't provide an Accept-Language header,
this method returns an ImmutableList containing one
Locale, the default locale for the server.
ImmutableList of preferred
Locale objects for the clientpublic String getCharacterEncoding()
public void setCharacterEncoding(String encoding)
throws UnsupportedEncodingException
UnsupportedEncodingException
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||