Class ContextImpl

java.lang.Object
org.jclouds.internal.ContextImpl
All Implemented Interfaces:
Closeable, AutoCloseable, Context, Location
Direct Known Subclasses:
ApiContextImpl

public class ContextImpl extends Object implements Context
  • Constructor Details

  • Method Details

    • close

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

      public boolean isOpen()
      Specified by:
      isOpen in interface Context
      Returns:
      true if context open
    • getProviderMetadata

      public ProviderMetadata getProviderMetadata()
      Specified by:
      getProviderMetadata in interface Context
      Returns:
      the providerMetadata used to create this context
      See Also:
    • getName

      public 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.
      Specified by:
      getName in interface Context
      Returns:
    • getIdentity

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

      public Utils utils()
      Specified by:
      utils in interface Context
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getDescription

      public String getDescription()
      Description of the location
      Specified by:
      getDescription in interface Location
    • getId

      public String getId()
      Unique ID provided by the provider (us-standard, miami, etc)
      Specified by:
      getId in interface Location
    • getIso3166Codes

      public Set<String> getIso3166Codes()
      Specified by:
      getIso3166Codes in interface Location
      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

      public Map<String,Object> getMetadata()
      Specified by:
      getMetadata in interface Location
      Returns:
      immutable set of metadata relating to this location
    • getParent

      public Location getParent()
      The parent, or null, if top-level
      Specified by:
      getParent in interface Location
    • getScope

      public LocationScope getScope()
      Scope of the location, ex. region, zone, host
      Specified by:
      getScope in interface Location