com.stackmob.core.rest
Class ProcessedAPIRequest

java.lang.Object
  extended by com.stackmob.core.rest.ProcessedAPIRequest

public class ProcessedAPIRequest
extends Object

Represents an API request.


Constructor Summary
ProcessedAPIRequest(MethodVerb verb, String url, String loggedInUser, Map<String,String> params, String appName, int apiVersion, String methodName, long counter)
          Create a new processed API request.
 
Method Summary
 int getApiVersion()
          Returns the API version number.
 String getAppName()
          Returns the application name.
 String getAppUrlSafeName()
          Deprecated. 
 long getCounter()
          Returns the request count.
 String getLoggedInUser()
          Returns the logged in user.
 String getMethodName()
          Returns the method name.
 Map<String,String> getParams()
          The query parameters.
 String getUrl()
          Returns the URL representing the request.
 MethodVerb getVerb()
          Returns the the HTTP verb.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProcessedAPIRequest

public ProcessedAPIRequest(MethodVerb verb,
                           String url,
                           String loggedInUser,
                           Map<String,String> params,
                           String appName,
                           int apiVersion,
                           String methodName,
                           long counter)
Create a new processed API request.

Parameters:
verb - the HTTP verb specified
url - the url which represents the request
apiVersion - the api version number associated with this request
params - the query parameters of the request
appName - the name of the app this request refers to
methodName - the name of the method being called by the request
loggedInUser - if a logged in user sent the request, their username is represented here
counter - the number of requests this particular JVM instance has handled up until this request
Method Detail

getVerb

public MethodVerb getVerb()
Returns the the HTTP verb.

Returns:
the HTTP verb associated with the request
See Also:
MethodVerb

getUrl

public String getUrl()
Returns the URL representing the request.

Returns:
the URL representing this request

getLoggedInUser

public String getLoggedInUser()
Returns the logged in user.

Returns:
the loggedInUser, or null if the user performing the request has not logged in

getParams

public Map<String,String> getParams()
The query parameters.

Returns:
the query parameters

getMethodName

public String getMethodName()
Returns the method name.

Returns:
the method name

toString

public String toString()
Overrides:
toString in class Object

getAppUrlSafeName

@Deprecated
public String getAppUrlSafeName()
Deprecated. 

Returns the application name.

Returns:
the application name

getAppName

public String getAppName()
Returns the application name.

Returns:
the application name

getApiVersion

public int getApiVersion()
Returns the API version number.

Returns:
the API version number for the request

getCounter

public long getCounter()
Returns the request count.

Returns:
the total number of requests across all apps for a particular client during the life of the current JVM


Copyright © 2012 StackMob. All Rights Reserved.