Package org.astrogrid.samp.web
Class ClientCallbackOperation
- java.lang.Object
-
- org.astrogrid.samp.web.ClientCallbackOperation
-
abstract class ClientCallbackOperation extends java.lang.Object
Represents one of the possible callbacks which may be invoked on a CallableClient. Theinvoke(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.- Since:
- 3 Feb 2011
- Author:
- Mark Taylor
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
fqName_
private static java.util.Map
OPERATION_MAP
private java.lang.Class[]
sampSig_
-
Constructor Summary
Constructors Modifier Constructor Description private
ClientCallbackOperation(java.lang.String methodName, java.lang.Class[] sampSig)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
dispatch
abstract void dispatch(CallableClient client, java.util.List paramList) throws java.lang.Exception
Makes a call to a callable client of the method represented by this operation with a given list of parameters. No checking is performed on the parameter list.This method should be private really, but abstract private is not permitted.
- Parameters:
client
- target callable clientparamList
- parameters for call, assumed to be valid- Throws:
java.lang.Exception
-
invoke
public static void invoke(Callback callback, CallableClient client) throws java.lang.Exception
Dispatches a callback to a CallableClient.- Parameters:
callback
- callback acquired from the hubclient
- client which should executecallback
- Throws:
java.lang.Exception
-
createOperationMap
private static java.util.Map createOperationMap()
Returns a map, keyed by unqualified operation name, of known callback operations.- Parameters:
String
- ->ClientCallbackOperation map
-
-