Interface DatasourceConnection

All Superinterfaces:
Connection
All Known Implementing Classes:
DatasourceConnectionV2Host

public interface DatasourceConnection extends Connection
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.
  • 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

      The type(s) of data that this connection provides.
      Returns:
      the datasource service(s)
    • processMessage

      void processMessage(AgentMessages.DataDocument data)
      Handles messages intended for this connector.
      Parameters:
      data - the data to be handled by the connection
    • spawnMetadataSync

      void spawnMetadataSync(SyncMode syncMode, Consumer<SyncResult> callback)
      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 sync
      callback - Callback that takes a SyncResult 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

      void setCurrentIndexingRequestSyncMode(SyncMode syncMode)
      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.