Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
JavaSE Documentation
RPCResponse

Class RPCResponse

Hierarchy

java.lang.Object
     com.smartdevicelink.proxy.RPCStruct
         com.smartdevicelink.proxy.RPCMessage

Package
com.smartdevicelink.proxy
All Known Subclasses
com.smartdevicelink.proxy.rpc.AddCommandResponse, com.smartdevicelink.proxy.rpc.AddSubMenuResponse, com.smartdevicelink.proxy.rpc.AlertManeuverResponse, com.smartdevicelink.proxy.rpc.AlertResponse, com.smartdevicelink.proxy.rpc.ButtonPressResponse, com.smartdevicelink.proxy.rpc.CancelInteractionResponse, com.smartdevicelink.proxy.rpc.ChangeRegistrationResponse, com.smartdevicelink.proxy.rpc.CloseApplicationResponse, com.smartdevicelink.proxy.rpc.CreateInteractionChoiceSetResponse, com.smartdevicelink.proxy.rpc.CreateWindowResponse, com.smartdevicelink.proxy.rpc.DeleteCommandResponse, com.smartdevicelink.proxy.rpc.DeleteFileResponse, com.smartdevicelink.proxy.rpc.DeleteInteractionChoiceSetResponse, com.smartdevicelink.proxy.rpc.DeleteSubMenuResponse, com.smartdevicelink.proxy.rpc.DeleteWindowResponse, com.smartdevicelink.proxy.rpc.DiagnosticMessageResponse, com.smartdevicelink.proxy.rpc.DialNumberResponse, com.smartdevicelink.proxy.rpc.EndAudioPassThruResponse, com.smartdevicelink.proxy.rpc.GenericResponse, com.smartdevicelink.proxy.rpc.GetAppServiceDataResponse, com.smartdevicelink.proxy.rpc.GetCloudAppPropertiesResponse, com.smartdevicelink.proxy.rpc.GetDTCsResponse, com.smartdevicelink.proxy.rpc.GetFileResponse, com.smartdevicelink.proxy.rpc.GetInteriorVehicleDataConsentResponse, com.smartdevicelink.proxy.rpc.GetInteriorVehicleDataResponse, com.smartdevicelink.proxy.rpc.GetSystemCapabilityResponse, com.smartdevicelink.proxy.rpc.GetVehicleDataResponse, com.smartdevicelink.proxy.rpc.GetWayPointsResponse, com.smartdevicelink.proxy.rpc.ListFilesResponse, com.smartdevicelink.proxy.rpc.PerformAppServiceInteractionResponse, com.smartdevicelink.proxy.rpc.PerformAudioPassThruResponse, com.smartdevicelink.proxy.rpc.PerformInteractionResponse, com.smartdevicelink.proxy.rpc.PublishAppServiceResponse, com.smartdevicelink.proxy.rpc.PutFileResponse, com.smartdevicelink.proxy.rpc.ReadDIDResponse, com.smartdevicelink.proxy.rpc.RegisterAppInterfaceResponse, com.smartdevicelink.proxy.rpc.ReleaseInteriorVehicleDataModuleResponse, com.smartdevicelink.proxy.rpc.ResetGlobalPropertiesResponse, com.smartdevicelink.proxy.rpc.ScrollableMessageResponse, com.smartdevicelink.proxy.rpc.SendHapticDataResponse, com.smartdevicelink.proxy.rpc.SendLocationResponse, com.smartdevicelink.proxy.rpc.SetAppIconResponse, com.smartdevicelink.proxy.rpc.SetCloudAppPropertiesResponse, com.smartdevicelink.proxy.rpc.SetDisplayLayoutResponse, com.smartdevicelink.proxy.rpc.SetGlobalPropertiesResponse, com.smartdevicelink.proxy.rpc.SetInteriorVehicleDataResponse, com.smartdevicelink.proxy.rpc.SetMediaClockTimerResponse, com.smartdevicelink.proxy.rpc.ShowAppMenuResponse, com.smartdevicelink.proxy.rpc.ShowConstantTbtResponse, com.smartdevicelink.proxy.rpc.ShowResponse, com.smartdevicelink.proxy.rpc.SliderResponse, com.smartdevicelink.proxy.rpc.SpeakResponse, com.smartdevicelink.proxy.rpc.SubscribeButtonResponse, com.smartdevicelink.proxy.rpc.SubscribeVehicleDataResponse, com.smartdevicelink.proxy.rpc.SubscribeWayPointsResponse, com.smartdevicelink.proxy.rpc.SubtleAlertResponse, com.smartdevicelink.proxy.rpc.SystemRequestResponse, com.smartdevicelink.proxy.rpc.UnpublishAppServiceResponse, com.smartdevicelink.proxy.rpc.UnregisterAppInterfaceResponse, com.smartdevicelink.proxy.rpc.UnsubscribeButtonResponse, com.smartdevicelink.proxy.rpc.UnsubscribeVehicleDataResponse, com.smartdevicelink.proxy.rpc.UnsubscribeWayPointsResponse, com.smartdevicelink.proxy.rpc.UpdateTurnListResponse

Overview

Result sent by SDL after an RPC is processed, consists of four parts:
  • CorrelationID:
      An integer value correlating the response to the corresponding request.
  • Success:
      A Boolean indicating whether the original request was successfully processed.
  • ResultCode:

      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

  • Info:
      A string of text representing additional information returned from SDL. This could be useful in debugging.

Fields

KEY_SUCCESS

public static final java.lang.String KEY_SUCCESS
Constant Value
"success"

KEY_INFO

public static final java.lang.String KEY_INFO
Constant Value
"info"

KEY_RESULT_CODE

public static final java.lang.String KEY_RESULT_CODE
Constant Value
"resultCode"

Inherited Fields

From Class Fields
com.smartdevicelink.proxy.RPCMessage KEY_REQUEST, KEY_RESPONSE, KEY_NOTIFICATION, KEY_FUNCTION_NAME, KEY_PARAMETERS, KEY_CORRELATION_ID, messageType, parameters, function
com.smartdevicelink.proxy.RPCStruct KEY_BULK_DATA, KEY_PROTECTED, store

Constructors

RPCResponse( String functionName )

Constructs a newly allocated RPCResponse object using function name

public RPCResponse(String functionName)

Constructor Parameters

functionName
a string that indicates the function's name

RPCResponse( java.util.Hashtable<java.lang.String, java.lang.Object> hash )

Constructs a newly allocated RPCResponse object indicated by the Hashtable parameter

public RPCResponse(java.util.Hashtable<java.lang.String, java.lang.Object> hash)

Constructor Parameters

hash
The Hashtable to use

RPCResponse( RPCMessage rpcMsg )

Constructs a newly allocated RPCResponse object using a RPCMessage object

public RPCResponse(RPCMessage rpcMsg)

Constructor Parameters

rpcMsg
The {@linkplain RPCMessage} to use

Methods

getCorrelationID()

Returns correlationID the ID of the request

public java.lang.Integer getCorrelationID()

setCorrelationID( Integer correlationID )

Set the correlationID

public com.smartdevicelink.proxy.RPCResponse setCorrelationID(Integer correlationID)

Method Parameters

correlationID
the ID of the response

getSuccess()

Returns Success whether the request is successfully processed

public java.lang.Boolean getSuccess()

setSuccess( Boolean success )

Set the Success status

public com.smartdevicelink.proxy.RPCResponse setSuccess(Boolean success)

Method Parameters

success
whether the request is successfully processed

getResultCode()

Returns ResultCode additional information about a response returning a failed outcome

public com.smartdevicelink.proxy.rpc.enums.Result getResultCode()

setResultCode( Result resultCode )

Set the additional information about a response returning a failed outcome

public com.smartdevicelink.proxy.RPCResponse setResultCode(Result resultCode)

Method Parameters

resultCode
whether the request is successfully processed

getInfo()

Returns a string of text representing additional information returned from SDL

public java.lang.String getInfo()

setInfo( String info )

Set a string of text representing additional information returned from SDL

public com.smartdevicelink.proxy.RPCResponse setInfo(String info)

Method Parameters

info
a string of text representing additional information returned from SDL

Inherited Methods

From Class Methods
com.smartdevicelink.proxy.RPCMessage getFunctionID, getFunctionName, setFunctionName, getMessageType, setParameters, getParameters, getObject, getString, getInteger, getFloat, getDouble, getBoolean, getLong
com.smartdevicelink.proxy.RPCStruct getStoreValue, getStore, deserializeJSON, serializeJSON, serializeJSON, format, getBulkData, setBulkData, setPayloadProtected, isPayloadProtected, getMessageTypeName, hasKey, setValue, getValue, getObject, formatObject, getValueForString, getString, getInteger, getDouble, getFloat, getBoolean, getLong, clone, equals, hashCode
java.lang.Object getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize
View on GitHub.com
Previous Section Next Section