com.stackmob.core.rest
Class ResponseToProcess

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

public class ResponseToProcess
extends Object

Represents the response to an API request. When returned, the response map will be processed into a JSON string and returned as a proper API response by StackMob.


Nested Class Summary
static class ResponseToProcess.FieldType
           
 
Constructor Summary
ResponseToProcess(int responseCode)
          Creates a new API response to process.
ResponseToProcess(int responseCode, byte[] responseByteArray)
          Creates a new API response to process.
ResponseToProcess(int responseCode, byte[] responseByteArray, Map<String,String> responseHeaders)
          Creates a new API response to process.
ResponseToProcess(int responseCode, Map<String,?> responseMap)
          Creates a new API response to process.
ResponseToProcess(int responseCode, Map<String,?> responseMap, Map<String,String> responseHeaders)
          Creates a new API response to process.
ResponseToProcess(int responseCode, String responseString)
          Creates a new API response to process.
ResponseToProcess(int responseCode, String responseString, Map<String,String> responseHeaders)
          Creates a new API response to process.
 
Method Summary
 byte[] getResponseByteArray()
          Returns the response byte array.
 int getResponseCode()
          Returns the HTTP response code.
 ResponseToProcess.FieldType getResponseField()
          Returns the response byte array.
 Map<String,String> getResponseHeaders()
          Returns the response headers.
 Map<String,?> getResponseMap()
          Returns the response map.
 String getResponseString()
          Returns the response String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResponseToProcess

public ResponseToProcess(int responseCode,
                         Map<String,?> responseMap,
                         Map<String,String> responseHeaders)
Creates a new API response to process.

Parameters:
responseCode - the HTTP response code
responseMap - the response map
responseHeaders - the response headers

ResponseToProcess

public ResponseToProcess(int responseCode,
                         String responseString,
                         Map<String,String> responseHeaders)
Creates a new API response to process.

Parameters:
responseCode - the HTTP response code
responseString - the response String
responseHeaders - the response headers

ResponseToProcess

public ResponseToProcess(int responseCode,
                         byte[] responseByteArray,
                         Map<String,String> responseHeaders)
Creates a new API response to process.

Parameters:
responseCode - the HTTP response code
responseByteArray - the response byte array
responseHeaders - the response headers

ResponseToProcess

public ResponseToProcess(int responseCode,
                         Map<String,?> responseMap)
Creates a new API response to process.

Parameters:
responseCode - the HTTP response code
responseMap - the response map

ResponseToProcess

public ResponseToProcess(int responseCode,
                         String responseString)
Creates a new API response to process.

Parameters:
responseCode - the HTTP response code
responseString - the response string

ResponseToProcess

public ResponseToProcess(int responseCode,
                         byte[] responseByteArray)
Creates a new API response to process.

Parameters:
responseCode - the HTTP response code
responseByteArray - the response map

ResponseToProcess

public ResponseToProcess(int responseCode)
Creates a new API response to process.

Parameters:
responseCode - the HTTP response code
Method Detail

getResponseCode

public int getResponseCode()
Returns the HTTP response code.

Returns:
the response code

getResponseMap

public Map<String,?> getResponseMap()
Returns the response map.

Returns:
the response map

getResponseString

public String getResponseString()
Returns the response String.

Returns:
the response String

getResponseByteArray

public byte[] getResponseByteArray()
Returns the response byte array.

Returns:
the response byte array

getResponseField

public ResponseToProcess.FieldType getResponseField()
Returns the response byte array.

Returns:
the response byte array

getResponseHeaders

public Map<String,String> getResponseHeaders()
Returns the response headers.

Returns:
the response headers


Copyright © 2013 StackMob. All Rights Reserved.