com.smaxe.uv.invoker.support
Class MethodInvoker

java.lang.Object
  extended by com.smaxe.uv.invoker.support.MethodInvoker
All Implemented Interfaces:
IMethodInvoker

public final class MethodInvoker
extends java.lang.Object
implements IMethodInvoker

MethodInvoker - very simple, general and, of course, inefficient IMethodInvoker implementation.

Author:
Andrei Sochirca

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.smaxe.uv.invoker.IMethodInvoker
IMethodInvoker.CallbackAdapter, IMethodInvoker.ICallback
 
Constructor Summary
MethodInvoker()
          Constructor.
MethodInvoker(java.util.concurrent.Executor executor, java.lang.String method)
          Constructor.
MethodInvoker(java.lang.String method)
          Constructor.
 
Method Summary
 void invoke(java.lang.Object o, java.lang.String method, IMethodInvoker.ICallback callback, java.lang.Object... args)
          Invokes method with the args of the object o.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodInvoker

public MethodInvoker()
Constructor.


MethodInvoker

public MethodInvoker(java.lang.String method)
Constructor.

Parameters:
method - class method that returns invocation object

MethodInvoker

public MethodInvoker(java.util.concurrent.Executor executor,
                     java.lang.String method)
Constructor.

Parameters:
executor - executor to use for method invocation
method - class method that returns invocation object
Method Detail

invoke

public void invoke(java.lang.Object o,
                   java.lang.String method,
                   IMethodInvoker.ICallback callback,
                   java.lang.Object... args)
Description copied from interface: IMethodInvoker
Invokes method with the args of the object o. The result is returned through the callback.

Specified by:
invoke in interface IMethodInvoker
Parameters:
o - object which method is invoked
method - method to invoke
callback - callback to receive invocation result
args - method arguments