org.apache.openejb.util
Class AsynchronousRunner

java.lang.Object
  extended by org.apache.openejb.util.AsynchronousRunner

public class AsynchronousRunner
extends java.lang.Object

Utility class used to invoke methods asynchronously, using a given Executor.


Constructor Summary
AsynchronousRunner(java.util.concurrent.Executor executor)
           
 
Method Summary
 java.util.concurrent.Future<java.lang.Object> runAsync(java.lang.Object object, java.lang.reflect.Method method, java.lang.Object... arguments)
          Performs the given method invocation asynchronously
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsynchronousRunner

public AsynchronousRunner(java.util.concurrent.Executor executor)
Method Detail

runAsync

public java.util.concurrent.Future<java.lang.Object> runAsync(java.lang.Object object,
                                                              java.lang.reflect.Method method,
                                                              java.lang.Object... arguments)
Performs the given method invocation asynchronously

Parameters:
object - The object which will have the method invoked
method - The method to be invoked
arguments - The invocation arguments
Returns:
A Future containing the method return value


Copyright © 1999-2011 The Apache OpenEJB development community. All Rights Reserved.