Package org.jclouds
Interface Context
-
- All Superinterfaces:
AutoCloseable
,Closeable
,Location
- All Known Subinterfaces:
ApiContext<A>
- All Known Implementing Classes:
ApiContextImpl
,ContextImpl
public interface Context extends Location, Closeable
Represents an authenticated context to the cloud.Note
Please issueclose()
when you are finished with this context in order to release resources.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Closes all connections, including executor serviceString
getIdentity()
String
getName()
Identifies the Context.ProviderMetadata
getProviderMetadata()
boolean
isOpen()
Utils
utils()
-
Methods inherited from interface org.jclouds.domain.Location
getDescription, getId, getIso3166Codes, getMetadata, getParent, getScope
-
-
-
-
Method Detail
-
getName
String 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.- Returns:
-
getProviderMetadata
ProviderMetadata getProviderMetadata()
- Returns:
- the providerMetadata used to create this context
- See Also:
ContextBuilder.newBuilder(org.jclouds.providers.ProviderMetadata)
-
getIdentity
String getIdentity()
- Returns:
- the current login user, access key, email, or whatever the 'identity' field was building the context.
- See Also:
ApiMetadata#getDefaultIdentity
-
utils
Utils utils()
-
close
void close()
Closes all connections, including executor service- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
isOpen
boolean isOpen()
- Returns:
- true if context open
-
-