Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.activemq.util
Class AsyncProxy  view AsyncProxy download AsyncProxy.java

java.lang.Object
  extended byorg.activemq.util.AsyncProxy
All Implemented Interfaces:
java.lang.reflect.InvocationHandler

public class AsyncProxy
extends java.lang.Object
implements java.lang.reflect.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 $

Field Summary
private  EDU.oswego.cs.dl.util.concurrent.Executor executor
           
private  org.apache.commons.logging.Log log
           
private  java.lang.Object realObject
           
 
Constructor Summary
AsyncProxy(EDU.oswego.cs.dl.util.concurrent.Executor executor, org.apache.commons.logging.Log log)
           
AsyncProxy(java.lang.Object realObject, EDU.oswego.cs.dl.util.concurrent.Executor executor)
           
AsyncProxy(java.lang.Object realObject, EDU.oswego.cs.dl.util.concurrent.Executor executor, org.apache.commons.logging.Log log)
           
 
Method Summary
static java.lang.Object createProxy(java.lang.Class interfaceType, java.lang.Object realObject, EDU.oswego.cs.dl.util.concurrent.Executor executor)
           
protected  void doAsyncMethodInvoke(java.lang.reflect.Method method, java.lang.Object[] args)
           
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
          When a method is invoked on a proxy instance, it is wrapped and this method is called instead, so that you may decide at runtime how the original method should behave.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

realObject

private java.lang.Object realObject

executor

private EDU.oswego.cs.dl.util.concurrent.Executor executor

log

private org.apache.commons.logging.Log log
Constructor Detail

AsyncProxy

public AsyncProxy(java.lang.Object realObject,
                  EDU.oswego.cs.dl.util.concurrent.Executor executor)

AsyncProxy

public AsyncProxy(java.lang.Object realObject,
                  EDU.oswego.cs.dl.util.concurrent.Executor executor,
                  org.apache.commons.logging.Log log)

AsyncProxy

public AsyncProxy(EDU.oswego.cs.dl.util.concurrent.Executor executor,
                  org.apache.commons.logging.Log log)
Method Detail

createProxy

public static java.lang.Object createProxy(java.lang.Class interfaceType,
                                           java.lang.Object realObject,
                                           EDU.oswego.cs.dl.util.concurrent.Executor executor)

invoke

public java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Description copied from interface: java.lang.reflect.InvocationHandler
When a method is invoked on a proxy instance, it is wrapped and this method is called instead, so that you may decide at runtime how the original method should behave.

Specified by:
invoke in interface java.lang.reflect.InvocationHandler

doAsyncMethodInvoke

protected void doAsyncMethodInvoke(java.lang.reflect.Method method,
                                   java.lang.Object[] args)