public abstract class BaseApiMetadata extends Object implements ApiMetadata
ApiMetadata
to be extended by those
implementing ApiMetadata.
(Note: This class must be abstract to allow ServiceLoader
to work properly.Modifier and Type | Class and Description |
---|---|
static class |
BaseApiMetadata.Builder<T extends BaseApiMetadata.Builder<T>> |
Modifier | Constructor and Description |
---|---|
protected |
BaseApiMetadata(BaseApiMetadata.Builder<?> builder) |
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) |
Modifier and Type | Method and Description |
---|---|
static Properties |
defaultProperties() |
boolean |
equals(Object o) |
com.google.common.base.Optional<String> |
getBuildVersion()
Explicitly identifies the build that the server jclouds connects to is
running.
|
com.google.common.reflect.TypeToken<? extends Context> |
getContext() |
com.google.common.base.Optional<String> |
getCredentialName()
Note: if the api doesn't need a credential, this will return absent.
|
com.google.common.base.Optional<String> |
getDefaultCredential()
Explicitly sets the secret, which when combined with the identity, will
create an authenticated subject or session
|
com.google.common.base.Optional<String> |
getDefaultEndpoint()
Explicitly identifies the most top-level endpoint to a service provider.
|
com.google.common.base.Optional<String> |
getDefaultIdentity()
Explicitly identifies the login identity into a provider
|
Set<Class<? extends com.google.inject.Module>> |
getDefaultModules()
Modules that configure dependency injection for this context
|
Properties |
getDefaultProperties()
Configuration Properties used when creating connections to this api
|
URI |
getDocumentation() |
String |
getEndpointName()
The
endpointName helps the user supply the correct data when
prompted. |
String |
getId() |
String |
getIdentityName() |
String |
getName() |
String |
getVersion()
Explicitly identifies the version of an api.
|
Set<com.google.common.reflect.TypeToken<? extends View>> |
getViews() |
int |
hashCode() |
protected com.google.common.base.Objects.ToStringHelper |
string() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
toBuilder
protected BaseApiMetadata(BaseApiMetadata.Builder<?> builder)
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)
public static Properties defaultProperties()
protected com.google.common.base.Objects.ToStringHelper string()
public String getId()
getId
in interface ApiMetadata
public String getName()
getName
in interface ApiMetadata
public Set<com.google.common.reflect.TypeToken<? extends View>> getViews()
getViews
in interface ApiMetadata
BlobStoreContext
public String getEndpointName()
endpointName
helps the user supply the correct data when
prompted.
For example, on OpenStack APIs, this could be: Keystone url
Path of byon.yaml
Default: "https endpoint"
getEndpointName
in interface ApiMetadata
public String getIdentityName()
getIdentityName
in interface ApiMetadata
public com.google.common.base.Optional<String> getCredentialName()
getCredentialName
in interface ApiMetadata
public String getVersion()
getVersion
in interface ApiMetadata
public com.google.common.base.Optional<String> getBuildVersion()
4.1.8
while
the build version is 4.1.8r75467
.getBuildVersion
in interface ApiMetadata
public com.google.common.base.Optional<String> getDefaultEndpoint()
String
as we permit endpoints that require
variable expansion.
ex.
https://${jclouds.identity}.blob.core.windows.net
getDefaultEndpoint
in interface ApiMetadata
public com.google.common.base.Optional<String> getDefaultIdentity()
getDefaultIdentity
in interface ApiMetadata
public com.google.common.base.Optional<String> getDefaultCredential()
getDefaultCredential
in interface ApiMetadata
ApiMetadata.getDefaultIdentity()
,
ApiMetadata.getCredentialName()
public Properties getDefaultProperties()
getDefaultProperties
in interface ApiMetadata
public URI getDocumentation()
getDocumentation
in interface ApiMetadata
public com.google.common.reflect.TypeToken<? extends Context> getContext()
getContext
in interface ApiMetadata
ApiContext<EC2Api>
public Set<Class<? extends com.google.inject.Module>> getDefaultModules()
getDefaultModules
in interface ApiMetadata
Copyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.