|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.csdn.modules.http.DefaultRestRequest
public class DefaultRestRequest
BlogInfo: WilliamZhu Date: 12-6-12 Time: 下午10:27
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface net.csdn.modules.http.RestRequest |
|---|
RestRequest.Method |
| Constructor Summary | |
|---|---|
DefaultRestRequest(javax.servlet.http.HttpServletRequest servletRequest)
|
|
DefaultRestRequest(String method,
Map params)
|
|
| Method Summary | |
|---|---|
String |
contentAsString()
|
byte[] |
contentByteArray()
|
int |
contentByteArrayOffset()
|
int |
contentLength()
|
boolean |
contentUnsafe()
Is the byte array write safe or unsafe for usage on other threads |
String |
cookie(String name)
|
Object |
flash(String key)
|
void |
flash(String key,
Object value)
|
boolean |
hasContent()
|
boolean |
hasParam(String key)
|
String |
header(String name)
|
RestRequest.Method |
method()
|
String |
param(String key)
|
String |
param(String key,
String defaultValue)
|
boolean |
paramAsBoolean(String key,
boolean defaultValue)
|
Boolean |
paramAsBoolean(String key,
Boolean defaultValue)
|
float |
paramAsFloat(String key,
float defaultValue)
|
int |
paramAsInt(String key,
int defaultValue)
|
long |
paramAsLong(String key,
long defaultValue)
|
net.csdn.common.unit.ByteSizeValue |
paramAsSize(String key,
net.csdn.common.unit.ByteSizeValue defaultValue)
|
String[] |
paramAsStringArray(String key,
String[] defaultValue)
|
net.csdn.common.unit.TimeValue |
paramAsTime(String key,
net.csdn.common.unit.TimeValue defaultValue)
|
String |
paramMultiKey(String... keys)
|
Map<String,String> |
params()
|
String |
path()
The path part of the URI (without the query string), decoded. |
String |
queryString()
|
String |
rawPath()
The non decoded, raw path provided. |
Object |
session(String key)
|
void |
session(String key,
Object value)
|
String |
uri()
The uri of the rest request, with the query string. |
String |
url()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultRestRequest(String method,
Map params)
public DefaultRestRequest(javax.servlet.http.HttpServletRequest servletRequest)
| Method Detail |
|---|
public RestRequest.Method method()
method in interface RestRequestpublic String uri()
RestRequest
uri in interface RestRequestpublic String url()
url in interface RestRequestpublic String queryString()
queryString in interface RestRequestpublic String rawPath()
RestRequest
rawPath in interface RestRequestpublic boolean hasContent()
hasContent in interface RestRequestpublic boolean contentUnsafe()
RestRequest
contentUnsafe in interface RestRequestpublic byte[] contentByteArray()
contentByteArray in interface RestRequestpublic int contentByteArrayOffset()
contentByteArrayOffset in interface RestRequestpublic int contentLength()
contentLength in interface RestRequestpublic String contentAsString()
contentAsString in interface RestRequestpublic String header(String name)
header in interface RestRequestpublic Map<String,String> params()
params in interface RestRequestpublic String cookie(String name)
cookie in interface RestRequestpublic Object session(String key)
session in interface RestRequest
public void session(String key,
Object value)
session in interface RestRequestpublic Object flash(String key)
flash in interface RestRequest
public void flash(String key,
Object value)
flash in interface RestRequestpublic boolean hasParam(String key)
hasParam in interface RestRequestpublic String param(String key)
param in interface RestRequestpublic String paramMultiKey(String... keys)
paramMultiKey in interface RestRequest
public String param(String key,
String defaultValue)
param in interface RestRequestpublic final String path()
RestRequest
path in interface RestRequest
public float paramAsFloat(String key,
float defaultValue)
paramAsFloat in interface RestRequest
public int paramAsInt(String key,
int defaultValue)
paramAsInt in interface RestRequest
public long paramAsLong(String key,
long defaultValue)
paramAsLong in interface RestRequest
public boolean paramAsBoolean(String key,
boolean defaultValue)
paramAsBoolean in interface RestRequest
public Boolean paramAsBoolean(String key,
Boolean defaultValue)
paramAsBoolean in interface RestRequest
public net.csdn.common.unit.TimeValue paramAsTime(String key,
net.csdn.common.unit.TimeValue defaultValue)
paramAsTime in interface RestRequest
public net.csdn.common.unit.ByteSizeValue paramAsSize(String key,
net.csdn.common.unit.ByteSizeValue defaultValue)
paramAsSize in interface RestRequest
public String[] paramAsStringArray(String key,
String[] defaultValue)
paramAsStringArray in interface RestRequest
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||