Package com.seeq.link.sdk.interfaces
Interface ConnectorServiceV2
- All Known Implementing Classes:
ConnectorV2Host
public interface ConnectorServiceV2
Provides services to the class that manages connections to external systems.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addConnection
(DatasourceConnectionV2 connection) Must be used when connections are established to external systems.Retrieves the agent service that can be used to access the REST API directly, among other things.loadConfig
(ConfigObject[] supportedObjects) Reads the configuration object from disk from the expected location (configuration/link within the data folder).org.slf4j.Logger
log()
Prints diagnostic messages to the Seeq agent log file (and the console).void
saveConfig
(ConfigObject configObject) Writes the configuration object to disk in the expected location (configuration/link within the data folder).void
setConnectorDeveloperName
(String connectorDeveloperName) This should be called by Connectors in the beginning of initialize() to set the developer's name.void
setConnectorDeveloperSupportUrl
(String connectorDeveloperSupportUrl) This should be called by Connectors in the beginning of initialize() to set the developer's support URL.
-
Method Details
-
loadConfig
Reads the configuration object from disk from the expected location (configuration/link within the data folder).- Parameters:
supportedObjects
- An array of object types to try loading. If the config file is not present, or none of the class types could successfully serialize the JSON, then the first item in the array is returned. This serves as mechanism for providing the "default" config object class.- Returns:
- The serialized config object, or the first item in
supportedObjects
. - Throws:
IOException
- Thrown if there is a problem reading the configuration file
-
saveConfig
Writes the configuration object to disk in the expected location (configuration/link within the data folder).- Parameters:
configObject
- The configuration object to write
-
addConnection
Must be used when connections are established to external systems. Note: This function is used even if connections are disabled.- Parameters:
connection
- The connection being established.
-
setConnectorDeveloperName
This should be called by Connectors in the beginning of initialize() to set the developer's name. This name is displayed in the user interface so users know who to contact when they need support. -
setConnectorDeveloperSupportUrl
This should be called by Connectors in the beginning of initialize() to set the developer's support URL. This URL is displayed in the user interface so users know who to contact when they need support. -
getConnectorDeveloperName
String getConnectorDeveloperName()- Returns:
- the name of the connector's developer, as set by setConnectorDeveloperName().
-
getConnectorDeveloperSupportUrl
String getConnectorDeveloperSupportUrl()- Returns:
- the support URL of the connector's developer, as set by setConnectorDeveloperSupportUrl().
-
getAgentService
AgentService getAgentService()Retrieves the agent service that can be used to access the REST API directly, among other things.- Returns:
- The agent service.
-
log
org.slf4j.Logger log()Prints diagnostic messages to the Seeq agent log file (and the console). The logging facility used is Logback. The log file is in the Seeq data folder: "log/jvm-link/jvm-link.log". When using the Debugging Agent, logs are only sent to the debug console.- Returns:
- logging facility
-