public class RPCResponse extends RPCMessage
The result code provides additional information about a response returning a failed outcome.
Any response can have at least one, or possibly more, of the following result code values: SUCCESS, INVALID_DATA, OUT_OF_MEMORY, TOO_MANY_PENDING_REQUESTS, APPLICATION_NOT_REGISTERED, GENERIC_ERROR,REJECTED.
Any additional result codes for a given operation can be found in related RPCs
| Modifier and Type | Field and Description |
|---|---|
static String |
KEY_INFO |
static String |
KEY_RESULT_CODE |
static String |
KEY_SUCCESS |
function, KEY_CORRELATION_ID, KEY_FUNCTION_NAME, KEY_NOTIFICATION, KEY_PARAMETERS, KEY_REQUEST, KEY_RESPONSE, messageType, parametersKEY_BULK_DATA, KEY_PROTECTED, store| Constructor and Description |
|---|
RPCResponse(Hashtable<String,Object> hash)
Constructs a newly allocated RPCResponse object indicated by the Hashtable parameter
|
RPCResponse(RPCMessage rpcMsg)
Constructs a newly allocated RPCResponse object using a RPCMessage object
|
RPCResponse(String functionName)
Constructs a newly allocated RPCResponse object using function name
|
| Modifier and Type | Method and Description |
|---|---|
Integer |
getCorrelationID()
Returns correlationID the ID of the request
|
String |
getInfo()
Returns a string of text representing additional information returned from SDL
|
Result |
getResultCode()
Returns ResultCode additional information about a response returning a failed outcome
|
Boolean |
getSuccess()
Returns Success whether the request is successfully processed
|
RPCResponse |
setCorrelationID(Integer correlationID)
Set the correlationID
|
RPCResponse |
setInfo(String info)
Set a string of text representing additional information returned from SDL
|
RPCResponse |
setResultCode(Result resultCode)
Set the additional information about a response returning a failed outcome
|
RPCResponse |
setSuccess(Boolean success)
Set the Success status
|
getBoolean, getDouble, getFloat, getFunctionID, getFunctionName, getInteger, getLong, getMessageType, getObject, getParameters, getString, setFunctionName, setParametersclone, deserializeJSON, equals, format, formatObject, getBulkData, getMessageTypeName, getStore, getStoreValue, getValue, getValueForString, hashCode, hasKey, isPayloadProtected, serializeJSON, serializeJSON, setBulkData, setPayloadProtected, setValuepublic static final String KEY_SUCCESS
public static final String KEY_INFO
public static final String KEY_RESULT_CODE
public RPCResponse(String functionName)
Constructs a newly allocated RPCResponse object using function name
functionName - a string that indicates the function's namepublic RPCResponse(Hashtable<String,Object> hash)
Constructs a newly allocated RPCResponse object indicated by the Hashtable parameter
hash - The Hashtable to usepublic RPCResponse(RPCMessage rpcMsg)
Constructs a newly allocated RPCResponse object using a RPCMessage object
rpcMsg - The RPCMessage to usepublic Integer getCorrelationID()
Returns correlationID the ID of the request
public RPCResponse setCorrelationID(Integer correlationID)
Set the correlationID
correlationID - the ID of the responsepublic Boolean getSuccess()
Returns Success whether the request is successfully processed
public RPCResponse setSuccess(@NonNull Boolean success)
Set the Success status
success - whether the request is successfully processedpublic Result getResultCode()
Returns ResultCode additional information about a response returning a failed outcome
public RPCResponse setResultCode(@NonNull Result resultCode)
Set the additional information about a response returning a failed outcome
resultCode - whether the request is successfully processedpublic String getInfo()
Returns a string of text representing additional information returned from SDL
public RPCResponse setInfo(String info)
Set a string of text representing additional information returned from SDL
info - a string of text representing additional information returned from SDL