net.csdn.modules.http
Interface RestRequest

All Known Implementing Classes:
DefaultRestRequest, MockRestRequest

public interface RestRequest

BlogInfo: WilliamZhu Date: 12-6-12 Time: 下午10:25


Nested Class Summary
static class RestRequest.Method
           
 
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()
           
 

Method Detail

method

RestRequest.Method method()

uri

String uri()
The uri of the rest request, with the query string.


rawPath

String rawPath()
The non decoded, raw path provided.


url

String url()

queryString

String queryString()

path

String path()
The path part of the URI (without the query string), decoded.


hasContent

boolean hasContent()

contentUnsafe

boolean contentUnsafe()
Is the byte array write safe or unsafe for usage on other threads


contentByteArray

byte[] contentByteArray()

contentByteArrayOffset

int contentByteArrayOffset()

contentLength

int contentLength()

contentAsString

String contentAsString()

header

String header(String name)

hasParam

boolean hasParam(String key)

param

String param(String key)

param

String param(String key,
             String defaultValue)

paramMultiKey

String paramMultiKey(String... keys)

paramAsStringArray

String[] paramAsStringArray(String key,
                            String[] defaultValue)

paramAsFloat

float paramAsFloat(String key,
                   float defaultValue)

paramAsInt

int paramAsInt(String key,
               int defaultValue)

paramAsLong

long paramAsLong(String key,
                 long defaultValue)

paramAsBoolean

boolean paramAsBoolean(String key,
                       boolean defaultValue)

paramAsBoolean

Boolean paramAsBoolean(String key,
                       Boolean defaultValue)

paramAsTime

net.csdn.common.unit.TimeValue paramAsTime(String key,
                                           net.csdn.common.unit.TimeValue defaultValue)

paramAsSize

net.csdn.common.unit.ByteSizeValue paramAsSize(String key,
                                               net.csdn.common.unit.ByteSizeValue defaultValue)

params

Map<String,String> params()

cookie

String cookie(String name)

session

Object session(String key)

session

void session(String key,
             Object value)

flash

Object flash(String key)

flash

void flash(String key,
           Object value)


Copyright © 2014. All Rights Reserved.