org.apache.shindig.protocol
Class ResponseItem

java.lang.Object
  extended by org.apache.shindig.protocol.ResponseItem

public final class ResponseItem
extends Object

Represents the response items that get handed back as json within the DataResponse.


Constructor Summary
ResponseItem(int errorCode, String errorMessage)
          Create a ResponseItem specifying the ResponseError and error Message.
ResponseItem(int errorCode, String errorMessage, Object response)
          Create a ResponseItem specifying the ResponseError and error Message.
ResponseItem(Object response)
          Create a ResponseItem specifying a value.
 
Method Summary
 boolean equals(Object o)
           
 int getErrorCode()
          Get the error code associated with this ResponseItem.
 String getErrorMessage()
          Get the Error Message associated with this Response Item.
 Object getResponse()
          Get the response value.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResponseItem

public ResponseItem(int errorCode,
                    String errorMessage)
Create a ResponseItem specifying the ResponseError and error Message.

Parameters:
errorCode - an RPC error code
errorMessage - the Error Message

ResponseItem

public ResponseItem(int errorCode,
                    String errorMessage,
                    Object response)
Create a ResponseItem specifying the ResponseError and error Message.

Parameters:
errorCode - an RPC error code
errorMessage - the Error Message
response - the application specific value that will be sent as as part of "data" section of the error.

ResponseItem

public ResponseItem(Object response)
Create a ResponseItem specifying a value.

Method Detail

getResponse

public Object getResponse()
Get the response value.


getErrorCode

public int getErrorCode()
Get the error code associated with this ResponseItem.

Returns:
the error code associated with this ResponseItem

getErrorMessage

public String getErrorMessage()
Get the Error Message associated with this Response Item.

Returns:
the Error Message

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2007-2012. All Rights Reserved.