Package org.jclouds.internal
Class ContextImpl
java.lang.Object
org.jclouds.internal.ContextImpl
- All Implemented Interfaces:
Closeable,AutoCloseable,Context,Location
- Direct Known Subclasses:
ApiContextImpl
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedContextImpl(String name, ProviderMetadata providerMetadata, com.google.common.base.Supplier<Credentials> creds, Utils utils, Closer closer) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes all connections, including executor servicebooleanDescription of the locationgetId()Unique ID provided by the provider (us-standard, miami, etc)getName()Identifies the Context.The parent, or null, if top-levelgetScope()Scope of the location, ex.inthashCode()booleanisOpen()toString()utils()
-
Constructor Details
-
ContextImpl
@Inject protected ContextImpl(String name, ProviderMetadata providerMetadata, com.google.common.base.Supplier<Credentials> creds, Utils utils, Closer closer)
-
-
Method Details
-
close
public void close()Closes all connections, including executor service -
isOpen
public boolean isOpen() -
getProviderMetadata
- Specified by:
getProviderMetadatain interfaceContext- Returns:
- the providerMetadata used to create this context
- See Also:
-
getName
Identifies the Context. This is a unique name optionally specified by the user and safe to index on. The purpose of this property is to provide means to distinct between multiple contexts, without having to check multiple properties or have explicit knowledge of how the context was created. -
getIdentity
- Specified by:
getIdentityin interfaceContext- Returns:
- the current login user, access key, email, or whatever the 'identity' field was building the context.
- See Also:
-
utils
-
hashCode
public int hashCode() -
equals
-
toString
-
getDescription
Description of the location- Specified by:
getDescriptionin interfaceLocation
-
getId
Unique ID provided by the provider (us-standard, miami, etc) -
getIso3166Codes
- Specified by:
getIso3166Codesin interfaceLocation- Returns:
- if known, the IS0 3166 or 3166-2 divisions where this service may run. ex. a set of strings like "US" or "US-CA"; otherwise returns an empty list.
- See Also:
-
getMetadata
- Specified by:
getMetadatain interfaceLocation- Returns:
- immutable set of metadata relating to this location
-
getParent
The parent, or null, if top-level -
getScope
Scope of the location, ex. region, zone, host
-