Interface ServiceConnector


public interface ServiceConnector
A service connector is a component that connects the Gateway to an external service. Service connectors are managed by a ServiceConnectorManager. The ServiceConnectorManager is responsible for starting and stopping service connectors, and for providing access to them. It's up to the ServiceConnector implementation to handle Enabled/Disabled state, licensing, and other runtime concerns. The states of the Service Connectors should be accurately represented by the HealthCheck returned by getHealthCheck().
  • Method Details

    • getHealthCheck

      com.codahale.metrics.health.HealthCheck getHealthCheck()
      HealthCheck used to monitor the service connector. Used for displaying connectivity in the Gateway Web Interface.
    • onStartup

      void onStartup(@Nullable @Nullable LicenseState licenseState) throws Exception
      Called when the service connector is started up. Connector should be ready for use after this method is called.
      Parameters:
      licenseState - The current license state of the module with id matching ServiceConnectorExtensionPoint.moduleId().
      Throws:
      Exception - If an error occurs during startup.
    • onShutdown

      void onShutdown() throws Exception
      Called when the service connector is shut down. Connector should release all resources and stop all operations.
      Throws:
      Exception - If an error occurs during shutdown.
    • onLicenseStateChange

      void onLicenseStateChange(@Nullable @Nullable LicenseState licenseState)
      Called when the license state of the module with id matching ServiceConnectorExtensionPoint.moduleId() changes.
      Parameters:
      licenseState - The new license state.