Package com.seeq.link.sdk.interfaces
Interface AgentService
public interface AgentService
This is the connector's "catch all" interface for interacting with the agent, and includes facilities for
communicating with the Seeq Server (via the Agent).
-
Method Summary
Modifier and TypeMethodDescriptionInstantiates a new BatchSizeHelper object with default values.createBatchSizeHelper
(int initialSize, Duration maximumDuration) Instantiates a new BatchSizeHelper object.The identification of the Agent.Provides instances of API objects.The service used to load/save configuration and retrieve global arguments.The path of the data folder for configuration, logs, and Seeq dataThe display name of the Agent.The TaskScheduler object that is used for all export jobs.The path of the Seeq global folderProvides instances of API objects that are used during indexing.External URL of the Seeq Server to which this agent is connected.boolean
boolean
Returns true if a full connection to Seeq Server has been established.void
markConnectionsAsReinitialized
(Collection<String> connectionIds) Marks the connections as reinitialized when sending the agent statusvoid
requestIndex
(DatasourceConnection connection) Requests a FULL re-indexing of the given Connection.void
requestIndex
(DatasourceConnection connection, SyncMode syncMode) Requests a re-indexing of the given Connection.void
Requests a restart of the Agent.resolveSecret
(String secretInputString) Gets the secret from the secretInputString.void
Update the Seeq Server with status information.void
sendMessage
(DatasourceConnection datasourceConnection, AgentMessages.DataDocument dataDocument) As part of theAgentService
interface, this function allows Connections to send data to Seeq Server by wrapping DataDocuments in an AgentMessage.
-
Method Details
-
isSeeqServerConnected
boolean isSeeqServerConnected()Returns true if a full connection to Seeq Server has been established.- Returns:
- true if a full connection to Seeq Server has been established
-
getConfigService
ConfigService getConfigService()The service used to load/save configuration and retrieve global arguments.- Returns:
- the config service
-
getApiProvider
SeeqApiProvider getApiProvider()Provides instances of API objects.- Returns:
- API provider instance
-
getIndexingApiProvider
SeeqApiProvider getIndexingApiProvider()Provides instances of API objects that are used during indexing. Note: Indexing Api Provider has a different retryTimeout than the default Api Provider. Retry timeout of Indexing Api Provider can be configured in the Agent configuration- Returns:
- API provider instance
-
getDisplayName
String getDisplayName()The display name of the Agent.- Returns:
- display name of the Agent
-
getAgentIdentification
String getAgentIdentification()The identification of the Agent.- Returns:
- the identification of the Agent
-
getDataFolder
Path getDataFolder()The path of the data folder for configuration, logs, and Seeq data- Returns:
- the folder path
-
getGlobalFolder
Path getGlobalFolder()The path of the Seeq global folder -
isRemoteAgent
boolean isRemoteAgent()- Returns:
- True if the agent is remote, false if it is local to the Seeq Server
-
getSeeqServerURL
String getSeeqServerURL()External URL of the Seeq Server to which this agent is connected. Note that this URL is the "external" URL that is accessed by users. It should not be used to programmatically create connections to the Seeq Server because the agent may not be able to resolve the external hostname. Use the ApiProvider members of this interface to obtain Seeq SDK interfaces configured with the correct "private" URL (if applicable). -
createBatchSizeHelper
BatchSizeHelper createBatchSizeHelper()Instantiates a new BatchSizeHelper object with default values. This exists for mocking purposes.- Returns:
- New BatchSizeHelper object.
-
createBatchSizeHelper
Instantiates a new BatchSizeHelper object. This exists for mocking purposes.- Parameters:
initialSize
- The initial value for the recommended batch size.maximumDuration
- The maximum duration for processing that the caller wants a single batch to take.- Returns:
- New BatchSizeHelper object.
-
sendMessage
void sendMessage(DatasourceConnection datasourceConnection, AgentMessages.DataDocument dataDocument) As part of theAgentService
interface, this function allows Connections to send data to Seeq Server by wrapping DataDocuments in an AgentMessage.- Parameters:
datasourceConnection
- The connection that is sending the message.dataDocument
- The data of the message to be sent.
-
sendAgentInfoToServer
void sendAgentInfoToServer()Update the Seeq Server with status information. This happens automatically on a regular basis and should only be called when it's desirable for the Seeq Server to get the update immediately. -
requestRestart
void requestRestart()Requests a restart of the Agent. This should be used only as a last resort for bugs in the third-party datasource libraries that cannot otherwise be handled by more surgical reset logic that is connection-specific. Since this command will restart the Agent itself, all existing requests across all connectors hosted by the Agent will be unceremoniously aborted and all connections dropped, with a short outage as the Agent is restarted by the Seeq "Supervisor" process. -
requestIndex
Requests a FULL re-indexing of the given Connection. -
requestIndex
Requests a re-indexing of the given Connection. -
resolveSecret
Gets the secret from the secretInputString. The input may contain a reference to a secret file in the form SECRETS_FILE:/path/to/the/secrets/file. The file may be also relative to the agent data_dir.- Parameters:
secretInputString
- the input as it comes from the configuration file (can be null)- Returns:
- null if the input is null the input if it doesn't start with the prefix "SECRETS_FILE:" the string from file if the input has syntax "SECRETS_FILE:/path/to/the/credentials/file"
-
markConnectionsAsReinitialized
Marks the connections as reinitialized when sending the agent status -
getExportTaskScheduler
ExportTaskScheduler getExportTaskScheduler()The TaskScheduler object that is used for all export jobs. This is shared at the agent level so that export jobs across all connectors and connections are routed through a single scheduler and the admin has complete control over how much load this agent puts on the Seeq Server due to export activity.
-