org.jclouds.concurrent.internal
Class SyncProxy

java.lang.Object
  extended by org.jclouds.concurrent.internal.SyncProxy
All Implemented Interfaces:
InvocationHandler

public class SyncProxy
extends Object
implements InvocationHandler

Generates RESTful clients from appropriately annotated interfaces.

Author:
Adrian Cole

Constructor Summary
SyncProxy(Class<?> declaring, Object async, ConcurrentMap<ClassMethodArgs,Object> delegateMap, Map<Class<?>,Class<?>> sync2Async)
           
 
Method Summary
 boolean equals(Object obj)
           
 int hashCode()
           
 Object invoke(Object o, Method method, Object[] args)
           
static
<T> T
proxy(Class<T> clazz, SyncProxy proxy)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SyncProxy

@Inject
public SyncProxy(Class<?> declaring,
                        Object async,
                        @Named(value="sync")
                        ConcurrentMap<ClassMethodArgs,Object> delegateMap,
                        Map<Class<?>,Class<?>> sync2Async)
          throws SecurityException,
                 NoSuchMethodException
Throws:
SecurityException
NoSuchMethodException
Method Detail

proxy

public static <T> T proxy(Class<T> clazz,
                          SyncProxy proxy)
               throws IllegalArgumentException,
                      SecurityException,
                      NoSuchMethodException
Throws:
IllegalArgumentException
SecurityException
NoSuchMethodException

invoke

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

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2011 jclouds. All Rights Reserved.