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
OnRPCListener

Class OnRPCListener

Hierarchy

java.lang.Object

Package
com.smartdevicelink.proxy.rpc.listeners
All Known Subclasses
com.smartdevicelink.proxy.rpc.listeners.OnMultipleRequestListener, com.smartdevicelink.proxy.rpc.listeners.OnRPCRequestListener, com.smartdevicelink.proxy.rpc.listeners.OnRPCResponseListener

Fields

UPDATE_LISTENER_TYPE_ALL_RPCS

public static final int UPDATE_LISTENER_TYPE_ALL_RPCS
Constant Value
-1

UPDATE_LISTENER_TYPE_BASE_RPC

public static final int UPDATE_LISTENER_TYPE_BASE_RPC

UPDATE_LISTENER_TYPE_MULTIPLE_REQUESTS

public static final int UPDATE_LISTENER_TYPE_MULTIPLE_REQUESTS
Constant Value
2

Constructors

OnRPCListener()

This is the base listener for all RPCs.

public OnRPCListener()

Methods

setListenerType( int type )

protected final void setListenerType(int type)

Method Parameters

type

getListenerType()

This is used to see what type of listener this instance is. It is needed because some RPCs require additional callbacks. Types are constants located in this class

public int getListenerType()

onReceived( RPCMessage message )

This is the only method that must be extended.

public abstract void onReceived(RPCMessage message)

Method Parameters

message
This will be the response message received from the core side. It should be cast into a corresponding RPC Response type. ie, if setting this for a PutFile request, the message parameter should be cast to a PutFileResponse class.

Inherited Methods

From Class Methods
java.lang.Object getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize
View on GitHub.com
Previous Section Next Section