|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sponsorpay.sdk.android.publisher.AbstractResponse
com.sponsorpay.sdk.android.publisher.currency.CurrencyServerAbstractResponse
public abstract class CurrencyServerAbstractResponse
Encloses a basic response received from the SponsorPay's Virtual Currency Server and methods to perform parsing of the returned JSON-encoded data.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.sponsorpay.sdk.android.publisher.AbstractResponse |
|---|
AbstractResponse.RequestErrorType |
| Field Summary | |
|---|---|
protected SPCurrencyServerListener |
mListener
Listener which will be notified after parsing the response. |
| Fields inherited from class com.sponsorpay.sdk.android.publisher.AbstractResponse |
|---|
ERROR_CODE_KEY, ERROR_MESSAGE_KEY, mErrorCode, mErrorMessage, mErrorType, mResponseBody, mResponseSignature, mResponseStatusCode |
| Constructor Summary | |
|---|---|
CurrencyServerAbstractResponse()
|
|
| Method Summary | |
|---|---|
static CurrencyServerAbstractResponse |
getParsingInstance(VirtualCurrencyConnector.RequestType requestType)
Returns the appropriate subclass to enclose and parse the response to a request of the passed type. |
void |
invokeOnErrorCallback()
Invokes the SPCurrencyServerListener.onSPCurrencyServerError(CurrencyServerAbstractResponse) of the
registered callback. |
void |
setResponseListener(SPCurrencyServerListener listener)
Set the response listener which will be notified when the parsing is complete. |
| Methods inherited from class com.sponsorpay.sdk.android.publisher.AbstractResponse |
|---|
getErrorCode, getErrorMessage, getErrorType, hasErrorStatusCode, invokeOnSuccessCallback, parseAndCallListener, parseErrorResponse, parseSuccessfulResponse, setResponseData, verifySignature |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected SPCurrencyServerListener mListener
| Constructor Detail |
|---|
public CurrencyServerAbstractResponse()
| Method Detail |
|---|
public void setResponseListener(SPCurrencyServerListener listener)
listener - public void invokeOnErrorCallback()
SPCurrencyServerListener.onSPCurrencyServerError(CurrencyServerAbstractResponse) of the
registered callback.
invokeOnErrorCallback in class AbstractResponsepublic static CurrencyServerAbstractResponse getParsingInstance(VirtualCurrencyConnector.RequestType requestType)
requestType - The type of the request whose response can be parsed by the returned instance.
CurrencyServerAbstractResponse, or null if no subclass is known for
parsing the provided VirtualCurrencyConnector.RequestType.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||