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().-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceListener for state changes in aServiceConnector. -
Method Summary
Modifier and TypeMethodDescriptioncom.codahale.metrics.health.HealthCheckHealthCheckused to monitor the service connector.voidonLicenseStateChange(@Nullable LicenseState licenseState) Called when the license state of the module with id matchingServiceConnectorExtensionPoint.moduleId()changes.voidCalled when the service connector is shut down.voidonStartup(@Nullable LicenseState licenseState) Called when the service connector is started up.
-
Method Details
-
getHealthCheck
com.codahale.metrics.health.HealthCheck getHealthCheck()HealthCheckused to monitor the service connector. Used for displaying connectivity in the Gateway Web Interface. -
onStartup
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 matchingServiceConnectorExtensionPoint.moduleId().- Throws:
Exception- If an error occurs during startup.
-
onShutdown
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
Called when the license state of the module with id matchingServiceConnectorExtensionPoint.moduleId()changes.- Parameters:
licenseState- The new license state.
-