CloudConnector Interface

 
 
 
The CloudConnector interface represents a connection to a specific instance of a cloud service. Implementations of this interface will provide CPBM handles to the various SPI implementations that interface with CPBM as described in later sections. Since these implementations are instance specific, ensure that they use the instance specific configuration values to connect to the appropriate instance of the cloud service. In addition, make sure that they are both thread-safe and have no shared state (across instances). How instance specific information is shared between the various SPI implementations is out of scope of this document. There are various ways this can be achieved and is left to the implementer to decide how they wish to architect this. The CloudConnector interface extends the Connector interface. For the purposes of this conversation, Connector itself is not pertinent except to say that the methods in it are applicable to CloudConnector. The CloudConnector interface is defined as follows:
/**   * BaseConnector is the base interface for all connectors. Cloud Service Connectors   * should always implement CloudConnector interface   */  public interface BaseConnector {    /**     * Sets the ServiceInstanceConfiguration corresponding to the service instance this     * is configured for     */    public void setServiceInstanceConfiguration(ServiceInstanceConfiguration config);  /**     * Gets the instance configuration     *      * @return the current service instance's configuration     **/    public ServiceInstanceConfiguration getServiceInstanceConfiguration();    /**     * Returns the service UUID for the configured service instance     */    public String getServiceUUID();    /**     * Returns the service instance UUID for the configured service instance     */    public String getServiceInstanceUUID();    /**     * Returns the service status (and verifies connectivity) of this service instance     */    public boolean getStatus();  }    /**   * The Connector expects basic account and user lifecycle    * capabilities. Cloud Services are expected to implement the     * extended CloudConnector interface instead.   */  public interface Connector extends BaseConnector {        /* Gets the account life cycle handler. */    public AccountLifecycleHandler getAccountLifeCycleHandler();        /* Gets the user life cycle handler. */    public UserLifecycleHandler getUserLifeCycleHandler();       }    public interface CloudConnector extends Connector {        /* Gets the metadata registry */    public MetadataRegistry getMetadataRegistry();      /* Gets the subscription lifecycle handler */    public SubscriptionLifecycleHandler getSubscriptionLifecycleHandler();      /* Gets the event collection service */    public EventCollector getEventCollector();      /* Gets the usage collection service */    public UsageCollector getUsageCollector();        /* Returns the view resolved configured for this service instance*/    public ViewResolver getViewResolver();     /* Get API handler for the api group */    public APIHandler getAPIHandler(String apiGroupName);     /*Get a map of API handles     */    public Map<String, String> getAPIHandles();     /*Returns the Sso handler */    public SsoHandler getSSOHandler();    }

All methods in the CloudConnector (and the Connector) interfaces are essentially factory methods that return service instance specific instantiations of their corresponding SPI interfaces.

 
또 다른 질문이 있으십니까? 문의 등록

댓글

 
Adding comment, please wait....

Provide Feedback on Article:

Subject:
Comments:*
Zendesk 제공