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 issue close() when you are finished with this context in order to release resources.
  • Method Details

    • 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:
    • getIdentity

      String getIdentity()
      Returns:
      the current login user, access key, email, or whatever the 'identity' field was building the context.
      See Also:
      • invalid reference
        ApiMetadata#getDefaultIdentity
    • utils

      Utils utils()
    • close

      void close()
      Closes all connections, including executor service
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • isOpen

      boolean isOpen()
      Returns:
      true if context open