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:
Serializable, ApiMetadata, RestApiMetadata
Direct Known Subclasses:
AnonymousRestApiMetadata

@Beta
public class BaseRestApiMetadata
extends BaseApiMetadata
implements RestApiMetadata

Useful in creating rest apis.

Author:
Adrian Cole
See Also:
Serialized Form

Nested Class Summary
static class BaseRestApiMetadata.Builder
           
 
Field Summary
protected  Class<?> api
           
protected  Class<?> asyncApi
           
 
Fields inherited from class org.jclouds.apis.internal.BaseApiMetadata
buildVersion, context, credentialName, defaultCredential, defaultEndpoint, defaultIdentity, defaultModules, defaultProperties, documentation, endpointName, id, identityName, name, version, views
 
Constructor Summary
protected BaseRestApiMetadata(BaseRestApiMetadata.Builder builder)
           
  BaseRestApiMetadata(Class<?> api, Class<?> asyncApi)
           
 
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()
           
 BaseRestApiMetadata.Builder toBuilder()
           
 
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
 

Field Detail

api

protected final Class<?> api

asyncApi

protected final Class<?> asyncApi
Constructor Detail

BaseRestApiMetadata

public BaseRestApiMetadata(Class<?> api,
                           Class<?> asyncApi)

BaseRestApiMetadata

protected BaseRestApiMetadata(BaseRestApiMetadata.Builder builder)
Method Detail

toBuilder

public BaseRestApiMetadata.Builder toBuilder()
Specified by:
toBuilder in interface ApiMetadata
Overrides:
toBuilder in class BaseApiMetadata
See Also:
ApiMetadata.Builder

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.