org.activemq.util
Class AsyncProxy

java.lang.Object
  extended by org.activemq.util.AsyncProxy
All Implemented Interfaces:
InvocationHandler

public class AsyncProxy
extends Object
implements InvocationHandler

A proxy to some service which offers an asynchronous way to invoke methods which are void and don't throw exceptions. Calling the method results in a command object being added to a queue for later execution.

Version:
$Revision: 1.1.1.1 $

Constructor Summary
AsyncProxy(Executor executor, Log log)
           
AsyncProxy(Object realObject, Executor executor)
           
AsyncProxy(Object realObject, Executor executor, Log log)
           
 
Method Summary
static Object createProxy(Class interfaceType, Object realObject, Executor executor)
           
protected  void doAsyncMethodInvoke(Method method, Object[] args)
           
 Object invoke(Object proxy, Method method, Object[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncProxy

public AsyncProxy(Object realObject,
                  Executor executor)

AsyncProxy

public AsyncProxy(Object realObject,
                  Executor executor,
                  Log log)

AsyncProxy

public AsyncProxy(Executor executor,
                  Log log)
Method Detail

createProxy

public static Object createProxy(Class interfaceType,
                                 Object realObject,
                                 Executor executor)

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Specified by:
invoke in interface InvocationHandler
Throws:
Throwable

doAsyncMethodInvoke

protected void doAsyncMethodInvoke(Method method,
                                   Object[] args)


Copyright © 2004-2008 Protique, Ltd.. All Rights Reserved.