Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

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.OnPutFileUpdateListener, 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_PUT_FILE

public static final int UPDATE_LISTENER_TYPE_PUT_FILE
Constant Value
1

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)

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)

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