class HubXmlRpcHandler extends ActorHandler
Modifier and Type | Class and Description |
---|---|
private static class |
HubXmlRpcHandler.HubActorImpl
Implementation of the
HubActor interface which does
the work for this class. |
Constructor and Description |
---|
HubXmlRpcHandler(SampXmlRpcClientFactory xClientFactory,
ClientProfile profile,
java.lang.String secret,
KeyGenerator keyGen)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
invokeMethod(java.lang.reflect.Method method,
java.lang.Object obj,
java.lang.Object[] args)
Invokes a method reflectively on an object.
|
canHandleCall, getActor, handleCall
public HubXmlRpcHandler(SampXmlRpcClientFactory xClientFactory, ClientProfile profile, java.lang.String secret, KeyGenerator keyGen)
xClientFactory
- XML-RPC client factory implementationprofile
- hub connection factorysecret
- password required for client registrationprotected java.lang.Object invokeMethod(java.lang.reflect.Method method, java.lang.Object obj, java.lang.Object[] args) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
ActorHandler
return method.invoke(obj,params)
.
If the implementation is effectively prescribed, why is this
abstract method here? It's tricky.
The reason is so that reflective method invocation from this class
is done by code within the actor implementation class itself
rather than by code in the superclass, ActorHandler
.
That in turn means that the actorType
class specified
in the constructor does not need to be visible from
ActorHandler
's package, only from the package where
the implementation class lives.
invokeMethod
in class ActorHandler
method
- method to invokeobj
- object to invoke the method onargs
- arguments for the method calljava.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
Method.invoke(java.lang.Object, java.lang.Object...)