Package org.jclouds.apis.internal
Class BaseApiMetadata
java.lang.Object
org.jclouds.apis.internal.BaseApiMetadata
- All Implemented Interfaces:
ApiMetadata
- Direct Known Subclasses:
BaseHttpApiMetadata,BYONApiMetadata,FilesystemApiMetadata,ServerManagerApiMetadata,StubApiMetadata,TransientApiMetadata
The BaseApiMetadata class is an abstraction of
ApiMetadata to be extended by those
implementing ApiMetadata.
(Note: This class must be abstract to allow ServiceLoader to work properly.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBaseApiMetadata.Builder<T extends BaseApiMetadata.Builder<T>> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseApiMetadata(String id, String name, Set<com.google.common.reflect.TypeToken<? extends View>> views, String endpointName, String identityName, com.google.common.base.Optional<String> credentialName, String version, com.google.common.base.Optional<String> buildVersion, com.google.common.base.Optional<String> defaultEndpoint, com.google.common.base.Optional<String> defaultIdentity, com.google.common.base.Optional<String> defaultCredential, Properties defaultProperties, URI documentation, com.google.common.reflect.TypeToken<? extends Context> context, Set<Class<? extends com.google.inject.Module>> defaultModules) protectedBaseApiMetadata(BaseApiMetadata.Builder<?> builder) -
Method Summary
Modifier and TypeMethodDescriptionstatic Propertiesbooleancom.google.common.base.Optional<String> Explicitly identifies the build that the server jclouds connects to is running.com.google.common.reflect.TypeToken<? extends Context> com.google.common.base.Optional<String> Note: if the api doesn't need a credential, this will return absent.com.google.common.base.Optional<String> Explicitly sets the secret, which when combined with the identity, will create an authenticated subject or sessioncom.google.common.base.Optional<String> Explicitly identifies the most top-level endpoint to a service provider.com.google.common.base.Optional<String> Explicitly identifies the login identity into a providerModules that configure dependency injection for this contextConfiguration Properties used when creating connections to this apiTheendpointNamehelps the user supply the correct data when prompted.getId()getName()Explicitly identifies the version of an api.getViews()inthashCode()protected com.google.common.base.MoreObjects.ToStringHelperstring()toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jclouds.apis.ApiMetadata
toBuilder
-
Constructor Details
-
BaseApiMetadata
-
BaseApiMetadata
protected BaseApiMetadata(String id, String name, Set<com.google.common.reflect.TypeToken<? extends View>> views, String endpointName, String identityName, com.google.common.base.Optional<String> credentialName, String version, com.google.common.base.Optional<String> buildVersion, com.google.common.base.Optional<String> defaultEndpoint, com.google.common.base.Optional<String> defaultIdentity, com.google.common.base.Optional<String> defaultCredential, Properties defaultProperties, URI documentation, com.google.common.reflect.TypeToken<? extends Context> context, Set<Class<? extends com.google.inject.Module>> defaultModules)
-
-
Method Details
-
defaultProperties
-
equals
-
hashCode
public int hashCode() -
toString
-
string
protected com.google.common.base.MoreObjects.ToStringHelper string() -
getId
- Specified by:
getIdin interfaceApiMetadata- Returns:
- the api's unique identifier (ex. ec2, openstack-nova)
-
getName
- Specified by:
getNamein interfaceApiMetadata- Returns:
- the name (display name) of the api (ex. EC2 Base API)
-
getViews
- Specified by:
getViewsin interfaceApiMetadata- Returns:
- types of contexts this can be transformed into, for example
BlobStoreContext
-
getEndpointName
TheendpointNamehelps the user supply the correct data when prompted. For example, on OpenStack APIs, this could be:Keystone url
For file-based apis, this could be:Path of byon.yamlDefault:"https endpoint"- Specified by:
getEndpointNamein interfaceApiMetadata- Returns:
- the name (display name) of an endpoint to this api (ex. Keystone url).
-
getIdentityName
- Specified by:
getIdentityNamein interfaceApiMetadata- Returns:
- the name (display name) of an identity on this api (ex. user, email, account, apikey, tenantId:username)
-
getCredentialName
Note: if the api doesn't need a credential, this will return absent.- Specified by:
getCredentialNamein interfaceApiMetadata- Returns:
- the name (display name) of a credential on this api, if it is required (ex. password, secret, rsaKey)
-
getVersion
Explicitly identifies the version of an api.- Specified by:
getVersionin interfaceApiMetadata
-
getBuildVersion
Explicitly identifies the build that the server jclouds connects to is running. For example, for virtualbox, the api version may be4.1.8while the build version is4.1.8r75467.- Specified by:
getBuildVersionin interfaceApiMetadata
-
getDefaultEndpoint
Explicitly identifies the most top-level endpoint to a service provider. This helps differentiate two providers of the same api, or a different environments providing the same api.note
The type of endpoint isStringas we permit endpoints that require variable expansion. ex.https://${jclouds.identity}.blob.core.windows.net- Specified by:
getDefaultEndpointin interfaceApiMetadata- Returns:
- the api's default endpoint, if known.
-
getDefaultIdentity
Explicitly identifies the login identity into a provider- Specified by:
getDefaultIdentityin interfaceApiMetadata- Returns:
- the login identity into a provider, if known.
-
getDefaultCredential
Explicitly sets the secret, which when combined with the identity, will create an authenticated subject or session- Specified by:
getDefaultCredentialin interfaceApiMetadata- Returns:
- the api's default credential, if known.
- See Also:
-
getDefaultProperties
Configuration Properties used when creating connections to this api- Specified by:
getDefaultPropertiesin interfaceApiMetadata- Returns:
- properties used to create connections to this api
-
getDocumentation
- Specified by:
getDocumentationin interfaceApiMetadata- Returns:
- the url for the API documentation related to this service
-
getContext
- Specified by:
getContextin interfaceApiMetadata- Returns:
- the primary context of this api, for example
ApiContext<EC2Api>
-
getDefaultModules
Modules that configure dependency injection for this context- Specified by:
getDefaultModulesin interfaceApiMetadata- Returns:
- modules that configure dependency injection for this context
-