|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
public interface Request
Date: 1/22/13 Time: 2:49 PM
| 方法摘要 | ||
|---|---|---|
String |
getBaseNetworkPath()
Returns the base network path of this request (ie baseUri without the protocol). |
|
String |
getBaseUri()
Returns the base URI of this request. |
|
String |
getCharacterEncoding()
|
|
String |
getClientAddress()
The address (IP) of the client. |
|
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, ... |
|
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. |
|
String |
getQueryParam(String param)
|
|
Map<String,List<String>> |
getQueryParams()
|
|
List<String> |
getQueryParams(String param)
|
|
String |
getRealPath(String path)
Returns the resty portion of the webRoot physical path. |
|
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)
|
|
boolean |
isSecured()
Is this request performed through a secured connection or not. |
|
void |
setCharacterEncoding(String var1)
|
|
|
unwrap(Class<T> clazz)
Unwraps the underlying native implementation of given class. |
|
| 方法详细信息 |
|---|
String getBaseUri()
String getBaseNetworkPath()
String getRestPath()
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
String getRealPath(String path)
path - webRoot relative path
String getRestUri()
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
boolean isSecured()
String getHttpMethod()
String getQueryParam(String param)
List<String> getQueryParams(String param)
Map<String,List<String>> getQueryParams()
String getHeader(String headerName)
Enumeration<String> getHeaders(String headerName)
Map<String,String> getHeaders()
String getContentType()
String getCookieValue(String cookieName)
boolean isPersistentCookie(String cookie)
Map<String,String> getCookiesMap()
String getClientAddress()
int getContentLength()
InputStream getContentStream()
throws IOException
IOException<T> T unwrap(Class<T> clazz)
T - unwrapped classclazz - the class of the underlying implementation
IllegalArgumentException - if the underlying implementation is not of given type.Locale getLocale()
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 clientList<Locale> getLocales()
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 clientString getCharacterEncoding()
void setCharacterEncoding(String var1)
throws UnsupportedEncodingException
UnsupportedEncodingException
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||