Package com.seeq.link.sdk.interfaces
Interface ConnectorV2
- All Known Subinterfaces:
NonConfigurableConnector
public interface ConnectorV2
This interface defines the functions that must be implemented by the class that manages connections to external systems.
Connectors are loaded via the ServiceLoader
mechanism. They need to be registered
under META-INF/services/com.seeq.link.sdk.interfaces.ConnectorV2
-
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Called by the host to destroy a connector.getName()
The name of the connector, as determined by the connector.void
initialize
(ConnectorServiceV2 connectorService) Called by the host to initialize a connector with the connector service interface it will use to accomplish tasks like adding connections.
-
Method Details
-
getName
String getName()The name of the connector, as determined by the connector. This name will be used for the configuration file name.- Returns:
- connector name
-
initialize
Called by the host to initialize a connector with the connector service interface it will use to accomplish tasks like adding connections. The implementation of this function can choose to automatically define and/or establish connections based on a global registry (like the PI "Known Servers Table").- Parameters:
connectorService
- The services provided to facilitate common connector functionality.- Throws:
Exception
- Thrown if the connector could not initialize correctly. For example, an exception will be thrown if the configuration file could not be read.
-
destroy
void destroy()Called by the host to destroy a connector. The connector should use the opportunity to clean up or and close any resources it is holding open, and shut down any threads it may have spawned. All Connections will have already been destroyed by the time this is called.
-