abstract class ClientCallbackOperation
extends java.lang.Object
invoke(org.astrogrid.samp.web.Callback, org.astrogrid.samp.client.CallableClient) static method arranges for a Callback
acquired from the hub to be dispatched to a CallableClient.| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
fqName_ |
private static java.util.Map |
OPERATION_MAP |
private java.lang.Class[] |
sampSig_ |
| Modifier | Constructor and Description |
|---|---|
private |
ClientCallbackOperation(java.lang.String methodName,
java.lang.Class[] sampSig)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
private static java.util.Map |
createOperationMap()
Returns a map, keyed by unqualified operation name,
of known callback operations.
|
(package private) abstract void |
dispatch(CallableClient client,
java.util.List paramList)
Makes a call to a callable client of the method represented by
this operation with a given list of parameters.
|
static void |
invoke(Callback callback,
CallableClient client)
Dispatches a callback to a CallableClient.
|
private final java.lang.String fqName_
private final java.lang.Class[] sampSig_
private static final java.util.Map OPERATION_MAP
private ClientCallbackOperation(java.lang.String methodName,
java.lang.Class[] sampSig)
unqualified - callback method namesignature - of callback; an array of SAMP-friendly classes,
one for each argumentabstract void dispatch(CallableClient client, java.util.List paramList) throws java.lang.Exception
This method should be private really, but abstract private is not permitted.
client - target callable clientparamList - parameters for call, assumed to be validjava.lang.Exceptionpublic static void invoke(Callback callback, CallableClient client) throws java.lang.Exception
callback - callback acquired from the hubclient - client which should execute callbackjava.lang.Exceptionprivate static java.util.Map createOperationMap()
String->ClientCallbackOperation - map