tangocard.sdk.service
Class ServiceProxy

java.lang.Object
  extended by tangocard.sdk.service.ServiceProxy

public class ServiceProxy
extends java.lang.Object

The Class ServiceProxy.


Constructor Summary
ServiceProxy(BaseRequest requestObject)
          Instantiates a new service proxy.
 
Method Summary
 boolean executeRequest(SuccessResponse responseSuccess)
          Execute request.
protected  boolean mapRequest()
          Map request.
protected  java.lang.String postRequest()
          Post request.
protected static void throwOnError(org.json.JSONObject responseJson)
          Throw on error.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceProxy

public ServiceProxy(BaseRequest requestObject)
             throws java.lang.Exception
Instantiates a new service proxy.

Parameters:
requestObject - the request object
Throws:
java.lang.Exception - the exception
Method Detail

executeRequest

public boolean executeRequest(SuccessResponse responseSuccess)
                       throws java.lang.Exception
Execute request.

Parameters:
responseSuccess - the response success
Returns:
true, if successful
Throws:
java.lang.Exception - the exception

mapRequest

protected boolean mapRequest()
                      throws java.lang.Exception
Map request.

Returns:
true, if successful
Throws:
java.lang.Exception - the exception

postRequest

protected java.lang.String postRequest()
                                throws java.lang.Exception
Post request.

Returns:
true, if successful
Throws:
java.lang.Exception - the exception

throwOnError

protected static void throwOnError(org.json.JSONObject responseJson)
                            throws org.json.JSONException,
                                   TangoCardServiceException,
                                   TangoCardSdkException
Throw on error.

Parameters:
responseJson - the response JSON
Throws:
org.json.JSONException - the JSON exception
TangoCardServiceException - the Tango Card service exception
TangoCardSdkException