org.jclouds.rest.config
Class BinderUtils
java.lang.Object
org.jclouds.rest.config.BinderUtils
public class BinderUtils
- extends Object
- Author:
- Adrian Cole
|
Method Summary |
static
|
bindBlockingApi(com.google.inject.Binder binder,
Class<S> sync,
Class<A> async)
adds an explicit binding for an interface which synchronously blocks on similar calls to an async type. |
static
|
bindHttpApi(com.google.inject.Binder binder,
Class<S> sync,
Class<A> async)
adds an explicit binding for async by parsing its annotations. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BinderUtils
public BinderUtils()
bindHttpApi
public static <S,A> void bindHttpApi(com.google.inject.Binder binder,
Class<S> sync,
Class<A> async)
- adds an explicit binding for
async by parsing its annotations. Then. adds an explicit binding for an
interface which synchronously blocks on similar calls to an async type.
- Type Parameters:
S - sync interface that blocksA - async type where all methods have same args as sync, but returns ListenableFuture- Parameters:
binder - guice bindersync - type interface that blocksasync - type type that returns ListenableFuture
bindBlockingApi
public static <S,A> void bindBlockingApi(com.google.inject.Binder binder,
Class<S> sync,
Class<A> async)
- adds an explicit binding for an interface which synchronously blocks on similar calls to an
async type.
- Type Parameters:
S - sync interface that blocksA - async type where all methods have same args as sync, but returns ListenableFuture- Parameters:
binder - guice bindersync - type interface that blocksasync - type type that returns ListenableFuture
Copyright © 2009-2013 jclouds. All Rights Reserved.