Package com.seeq.link.sdk.interfaces
Interface DatasourceConnectionV2
- All Known Subinterfaces:
ConditionPullDatasourceConnection
,IndexingDatasourceConnection
,NonSchedulableIndexingConnection
,PullDatasourceConnection
,SignalPullDatasourceConnection
public interface DatasourceConnectionV2
This interface defines the functions that must be implemented by the class that facilitates a connection to an
external system.
Threading considerations:
Initialize() and Destroy() are called by the connector host on its own thread.
Connect(), Monitor() and Disconnect() are all called from a (different) single thread.
Index() is called on its own thread. Index() calls are always on the same thread and therefore sequential.
All other interface methods may be called from multiple threads simultaneously.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
connect()
Attempts a connection to the external system.default void
destroy()
Destroys a connection, cleaning up any resources as necessary.void
Disconnects from the external system.A unique identifier for the datasource.The unique identifier of the datasource.The name of the datasource as it is intended to appear in Seeq.void
initialize
(DatasourceConnectionServiceV2 connectionService) Initializes a connection, attempting to connect if enabled.boolean
monitor()
Examines the state of the connection to determine if it has become disconnected.void
Called by an Agent when the agent has changed the connection's configuration (usually due to the indexing schedule being updated).
-
Method Details
-
getDatasourceClass
String getDatasourceClass()A unique identifier for the datasource. This is usually a GUID generated for the configuration file.- Returns:
- the class of data for the external system
-
getDatasourceName
String getDatasourceName()The name of the datasource as it is intended to appear in Seeq.- Returns:
- the name of the datasource as it is intended to appear in Seeq
-
getDatasourceId
String getDatasourceId()The unique identifier of the datasource. This is typically a GUID, and must not change once established.- Returns:
- the unique identifier of the datasource
-
initialize
Initializes a connection, attempting to connect if enabled.- Parameters:
connectionService
- Provides all required services for accomplishing tasks like indexing and responding to requests.
-
destroy
default void destroy()Destroys a connection, cleaning up any resources as necessary. -
connect
void connect()Attempts a connection to the external system. -
monitor
boolean monitor()Examines the state of the connection to determine if it has become disconnected.- Returns:
- true if the connection is live, false if it has become disconnected. A return of false will cause the
disconnect()
method to be invoked.
-
disconnect
void disconnect()Disconnects from the external system. -
saveConfig
void saveConfig()Called by an Agent when the agent has changed the connection's configuration (usually due to the indexing schedule being updated).
-