Package com.seeq.link.sdk.interfaces
Interface DatasourceConnection
- All Superinterfaces:
Connection
- All Known Implementing Classes:
DatasourceConnectionV2Host
This interface is a specialization of a general connection. The Seeq Server connection (exposed via ISeeqConnection)
is a general connection, while a datasource connection is only implemented by connections made from connectors.
Datasource connections have extra information like ConnectionID and DatasourceID.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.seeq.link.sdk.interfaces.Connection
Connection.ConnectionState, Connection.StateChangedEventArgs
-
Method Summary
Modifier and TypeMethodDescriptionThe id of the connection.The current indexing requests's sync modeThe human readable name of the type of data source this connection is to.The unique identifier of the data source this connection is to.A human readable name for the data source this connection is to.The indexing schedule for this connection, including the time and period of delay.The current state of indexing, including item counts and sync status.The type(s) of data that this connection provides.boolean
Indicates whether metadata sync is supportedboolean
Indicates whether metadata sync can be triggered from outside the connector (from scheduler, or requested on demand from the UI)boolean
Indicates whether pull requests are supportedvoid
metadataSync
(SyncMode syncMode) Sync metadata with the appserver.void
Handles messages intended for this connector.void
Called by an Agent when the agent has changed the connection's configuration (usually due to the indexing schedule being updated.void
setCurrentIndexingRequestSyncMode
(SyncMode syncMode) Sets the current indexing requests's sync modevoid
spawnMetadataSync
(SyncMode syncMode, Consumer<SyncResult> callback) Spawn a thread and runs metadataSync() on it.Methods inherited from interface com.seeq.link.sdk.interfaces.Connection
destroy, disable, enable, getConnectionMessage, getMaxReconnectDelay, getMinReconnectDelay, getMonitorPeriod, getState, getStateChangedEvent, initialize, setMaxReconnectDelay, setMinReconnectDelay, setMonitorPeriod
-
Method Details
-
getConnectionId
String getConnectionId()The id of the connection.- Returns:
- the connection id
-
getDatasourceName
String getDatasourceName()A human readable name for the data source this connection is to.- Returns:
- the datasource name
-
getDatasourceId
String getDatasourceId()The unique identifier of the data source this connection is to.- Returns:
- the datasource ID
-
getDatasourceClass
String getDatasourceClass()The human readable name of the type of data source this connection is to.- Returns:
- the datasource class
-
getServices
AgentMessages.DatasourceService[] getServices()The type(s) of data that this connection provides.- Returns:
- the datasource service(s)
-
processMessage
Handles messages intended for this connector.- Parameters:
data
- the data to be handled by the connection
-
spawnMetadataSync
Spawn a thread and runs metadataSync() on it. This ensures the sync happens asynchronously and that there is only one sync at a time, per connection.- Parameters:
syncMode
- Indicates whether to perform a full or incremental synccallback
- Callback that takes aSyncResult
to indicate success/failure/cancellation
-
metadataSync
void metadataSync(SyncMode syncMode) throws com.seeq.utilities.exception.OperationCanceledException, Exception Sync metadata with the appserver.- Parameters:
syncMode
- Indicates whether to perform a full or incremental sync- Throws:
com.seeq.utilities.exception.OperationCanceledException
- Thrown when sync operation is interrupted by configuration reload or disabling.Exception
- Thrown when metadata sync fails for unexpected reasons and should be retried.
-
isPullDatasourceConnection
boolean isPullDatasourceConnection()Indicates whether pull requests are supported- Returns:
- True, if pull requests are supported, false otherwise
-
isIndexingDatasourceConnection
boolean isIndexingDatasourceConnection()Indicates whether metadata sync is supported- Returns:
- True, if metadata sync is supported, false otherwise
-
isIndexingScheduleSupported
boolean isIndexingScheduleSupported()Indicates whether metadata sync can be triggered from outside the connector (from scheduler, or requested on demand from the UI)- Returns:
- True, if metadata sync can be triggered from outside the connector, false otherwise
-
getIndexingSchedule
IndexingSchedule getIndexingSchedule()The indexing schedule for this connection, including the time and period of delay.- Returns:
- indexing schedule for this connection.
-
getIndexingState
IndexingState getIndexingState()The current state of indexing, including item counts and sync status.- Returns:
- current state of indexing
-
getCurrentIndexingRequestSyncMode
SyncMode getCurrentIndexingRequestSyncMode()The current indexing requests's sync mode- Returns:
- the sync mode of the current indexing request
-
setCurrentIndexingRequestSyncMode
Sets the current indexing requests's sync mode- Parameters:
syncMode
- the new sync mode of the current indexing request
-
saveConfig
void saveConfig()Called by an Agent when the agent has changed the connection's configuration (usually due to the indexing schedule being updated.
-