org.jclouds.rest.internal
Class BaseRestApiMetadata

java.lang.Object
  extended by org.jclouds.apis.internal.BaseApiMetadata
      extended by org.jclouds.rest.internal.BaseRestApiMetadata
All Implemented Interfaces:
ApiMetadata, RestApiMetadata
Direct Known Subclasses:
AnonymousRestApiMetadata

@Beta
public abstract class BaseRestApiMetadata
extends BaseApiMetadata
implements RestApiMetadata

Useful in creating rest apis.

Author:
Adrian Cole

Nested Class Summary
static class BaseRestApiMetadata.Builder<T extends BaseRestApiMetadata.Builder<T>>
           
 
Field Summary
protected  Class<?> api
           
protected  Class<?> asyncApi
           
 
Constructor Summary
protected BaseRestApiMetadata(BaseRestApiMetadata.Builder<?> builder)
           
 
Method Summary
static
<S,A> com.google.common.reflect.TypeToken<RestContext<S,A>>
contextToken(com.google.common.reflect.TypeToken<S> apiToken, com.google.common.reflect.TypeToken<A> asyncApiToken)
           
static Properties defaultProperties()
           
 Class<?> getApi()
          
 Class<?> getAsyncApi()
          
protected  com.google.common.base.Objects.ToStringHelper string()
           
 
Methods inherited from class org.jclouds.apis.internal.BaseApiMetadata
equals, getBuildVersion, getContext, getCredentialName, getDefaultCredential, getDefaultEndpoint, getDefaultIdentity, getDefaultModules, getDefaultProperties, getDocumentation, getEndpointName, getId, getIdentityName, getName, getVersion, getViews, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jclouds.apis.ApiMetadata
getBuildVersion, getContext, getCredentialName, getDefaultCredential, getDefaultEndpoint, getDefaultIdentity, getDefaultModules, getDefaultProperties, getDocumentation, getEndpointName, getId, getIdentityName, getName, getVersion, getViews, toBuilder
 

Field Detail

api

protected final Class<?> api

asyncApi

protected final Class<?> asyncApi
Constructor Detail

BaseRestApiMetadata

protected BaseRestApiMetadata(BaseRestApiMetadata.Builder<?> builder)
Method Detail

defaultProperties

public static Properties defaultProperties()

contextToken

public static <S,A> com.google.common.reflect.TypeToken<RestContext<S,A>> contextToken(com.google.common.reflect.TypeToken<S> apiToken,
                                                                                       com.google.common.reflect.TypeToken<A> asyncApiToken)

getApi

public Class<?> getApi()

Specified by:
getApi in interface RestApiMetadata
Returns:
the type of the api which blocks on all requests

getAsyncApi

public Class<?> getAsyncApi()

Specified by:
getAsyncApi in interface RestApiMetadata
Returns:
the type of the api, which is the same as RestApiMetadata.getApi(), except all methods return ListenableFuture

string

protected com.google.common.base.Objects.ToStringHelper string()
Overrides:
string in class BaseApiMetadata


Copyright © 2009-2013 jclouds. All Rights Reserved.