public abstract class OnRPCListener extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
UPDATE_LISTENER_TYPE_ALL_RPCS
Generic listener for all RPCs including Requests, response, and notification
|
static int |
UPDATE_LISTENER_TYPE_BASE_RPC
Generic listener type that will work for most RPCs
|
static int |
UPDATE_LISTENER_TYPE_MULTIPLE_REQUESTS
Listener type specific to sendRequests and sendSequentialRequests
|
| Constructor and Description |
|---|
OnRPCListener()
This is the base listener for all RPCs.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getListenerType()
This is used to see what type of listener this instance is.
|
abstract void |
onReceived(RPCMessage message)
This is the only method that must be extended.
|
protected void |
setListenerType(int type) |
public static final int UPDATE_LISTENER_TYPE_ALL_RPCS
public static final int UPDATE_LISTENER_TYPE_BASE_RPC
public static final int UPDATE_LISTENER_TYPE_MULTIPLE_REQUESTS
protected final void setListenerType(int type)
public int getListenerType()
public abstract void onReceived(RPCMessage message)
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.