org.jclouds.rest.config
Class BinderUtils

java.lang.Object
  extended by org.jclouds.rest.config.BinderUtils

public class BinderUtils
extends Object


Constructor Summary
BinderUtils()
           
 
Method Summary
static
<S,A> void
bindHttpApi(com.google.inject.Binder binder, Class<A> api)
          adds an explicit binding for async by parsing its annotations.
static
<S,A> void
bindSyncToAsyncApi(com.google.inject.Binder binder, Class<S> sync, Class<A> async)
          Deprecated. will be removed in jclouds 1.7, as async interfaces are no longer supported.
static
<S,A> void
bindSyncToAsyncHttpApi(com.google.inject.Binder binder, Class<S> sync, Class<A> async)
          Deprecated. will be removed in jclouds 1.7, as async interfaces are no longer supported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinderUtils

public BinderUtils()
Method Detail

bindHttpApi

public static <S,A> void bindHttpApi(com.google.inject.Binder binder,
                                     Class<A> api)
adds an explicit binding for async by parsing its annotations.

Type Parameters:
S - sync interface that blocks
A - api type with http annotations
Parameters:
binder - guice binder
api - type with http annotations

bindSyncToAsyncHttpApi

@Deprecated
public static <S,A> void bindSyncToAsyncHttpApi(com.google.inject.Binder binder,
                                                           Class<S> sync,
                                                           Class<A> async)
Deprecated. will be removed in jclouds 1.7, as async interfaces are no longer supported.

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 blocks
A - async type where all methods have same args as sync, but returns ListenableFuture
Parameters:
binder - guice binder
sync - type interface that blocks
async - type type that returns ListenableFuture

bindSyncToAsyncApi

@Deprecated
public static <S,A> void bindSyncToAsyncApi(com.google.inject.Binder binder,
                                                       Class<S> sync,
                                                       Class<A> async)
Deprecated. will be removed in jclouds 1.7, as async interfaces are no longer supported.

adds an explicit binding for an interface which synchronously blocks on similar calls to an async type.

Type Parameters:
S - sync interface that blocks
A - async type where all methods have same args as sync, but returns ListenableFuture
Parameters:
binder - guice binder
sync - type interface that blocks
async - type type that returns ListenableFuture


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