org.jclouds.rest.internal
Class DelegatesToInvocationFunction<S,F extends com.google.common.base.Function<Invocation,Object>>

java.lang.Object
  extended by org.jclouds.rest.internal.DelegatesToInvocationFunction<S,F>
Type Parameters:
S - The enclosing type of the interface that a dynamic proxy like this implements
F - The function that implements this dynamic proxy
All Implemented Interfaces:
InvocationHandler
Direct Known Subclasses:
DelegatesToPotentiallySyncToAsyncInvocationFunction

@Beta
public class DelegatesToInvocationFunction<S,F extends com.google.common.base.Function<Invocation,Object>>
extends Object
implements InvocationHandler


Field Summary
protected  com.google.inject.Injector injector
           
protected  F methodInvoker
           
protected  com.google.common.base.Function<InvocationSuccess,com.google.common.base.Optional<Object>> optionalConverter
           
protected  com.google.common.reflect.TypeToken<S> ownerType
           
protected  SetCaller setCaller
           
 
Method Summary
protected  Object handle(Invocation invocation)
           
 Object invoke(Object proxy, Method invoked, Object[] argv)
          
protected  com.google.inject.Key<?> methodInvokerFor(Class<?> returnType)
          attempts to guess the generic type params for the delegate's invocation function based on the supplied type
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

injector

protected final com.google.inject.Injector injector

ownerType

protected final com.google.common.reflect.TypeToken<S> ownerType

setCaller

protected final SetCaller setCaller

optionalConverter

protected final com.google.common.base.Function<InvocationSuccess,com.google.common.base.Optional<Object>> optionalConverter

methodInvoker

protected final F extends com.google.common.base.Function<Invocation,Object> methodInvoker
Method Detail

invoke

public final Object invoke(Object proxy,
                           Method invoked,
                           @Nullable
                           Object[] argv)
                    throws Throwable

Specified by:
invoke in interface InvocationHandler
Throws:
Throwable

handle

protected Object handle(Invocation invocation)

methodInvokerFor

protected com.google.inject.Key<?> methodInvokerFor(Class<?> returnType)
attempts to guess the generic type params for the delegate's invocation function based on the supplied type


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.