public class ThreadInvokingReceiver extends InvokingReceiver
MethodExecutor.ExecutableMethod
differentiateByArgNo, registeredMethods
executionObject
Constructor and Description |
---|
ThreadInvokingReceiver(java.lang.Object executionObject,
java.lang.String methodsName)
Creates a new instance of ThreadInvokingReceiver for message methods.
|
Modifier and Type | Method and Description |
---|---|
protected void |
processMessage(Message msg,
java.lang.reflect.Method method)
Run a separate thread that invokes the accepted message's method.
|
acceptMessage
getClassMethods, getDifferentiatingClasses, getDifferentiatingClasses, getMethod, getMethod, getRegisteredMethods
backgroundExecute, backgroundExecute, backgroundExecute, execute, execute, printUsage, printUsage, printUsage
public ThreadInvokingReceiver(java.lang.Object executionObject, java.lang.String methodsName) throws java.lang.IllegalArgumentException
executionObject
that have the specified methodsName
and one message argument
(i.e. a class that is a descendant of Message
) are remebered and associated with
their message argument class.
Invoking then uses this fast association to invoke a method specific for the received message
(according to its class).executionObject
- the object on which the message methods are invokedmethodsName
- the name of the methods to inspect (if null, all methods are inspected)java.lang.IllegalArgumentException
- if the supplied execution object is nullprotected void processMessage(Message msg, java.lang.reflect.Method method)
processMessage
in class InvokingReceiver
msg
- the accepted message (it will be the parameter for the invoked method)method
- the method to invoke on the executionObject