Class IntegrationConnectorHandler
java.lang.Object
org.odpi.openmetadata.governanceservers.integrationdaemonservices.handlers.IntegrationConnectorHandler
IntegrationConnectorReport provides information on the operation of a single connector within an integration
service.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
disconnectConnector
(String actionDescription) Request that the connector instance releases its resources.void
engageConnector
(String actionDescription) Call engage() method of the integration connector.Retrieve the configuration properties of the connector.Return the connection used to create the connector.Retrieve details of this connector.Return the message extracted from an exception returned by the connector.Return the unique identifier of the connector entity from the configuration or the integration group definition.Return the unique identifier of the connector from the configuration or the integration group definition.Return the unique instance identifier of the connector.Return the name of the connector.Return the status for the integration connector.Return the date/time when the connector was last refreshed.Return the date/time when the status was last changed.long
Return the configured minimum time between calls to refresh.Return the earliest time that this connector can run.Return the statistics logged by the connector.Return the latest time that this connector can run.boolean
Does the connector need to run in a dedicated thread.void
refreshConnector
(String actionDescription) Call refresh() on the connector provided it is in the correct state.void
refreshConnectorDetails
(RegisteredIntegrationConnectorElement registeredIntegrationConnectorElement) Update the connector properties with as little disruption to the running connector.void
reinitializeConnector
(String actionDescription) Initialize a new integration connector instance.void
Shutdown the connector handler.void
updateConfigurationProperties
(String userId, String actionDescription, boolean isMergeUpdate, Map<String, Object> configurationProperties) Update the configuration properties of the connector and restart it.void
updateConnectorConnection
(String userId, String actionDescription, Connection connection) Update the connection for a specific integration connector.boolean
updateConnectorDetails
(RegisteredIntegrationConnectorElement registeredIntegrationConnectorElement) Update the connector properties with as little disruption to the running connector.void
updateEndpointNetworkAddress
(String userId, String actionDescription, String networkAddress) Update the endpoint network address for a specific integration connector.
-
Method Details
-
getConnectorReport
Retrieve details of this connector.- Returns:
- connector report
-
getIntegrationConnectorId
Return the unique identifier of the connector from the configuration or the integration group definition.- Returns:
- String name
-
getIntegrationConnectorGUID
Return the unique identifier of the connector entity from the configuration or the integration group definition.- Returns:
- String name
-
getIntegrationConnectorName
Return the name of the connector. This name is used for routing refresh calls to the connector as well as being used for diagnostics. Ideally it should be unique amongst the connectors for the integration service.- Returns:
- String name
-
getConnection
Return the connection used to create the connector.- Returns:
- connection
-
getIntegrationConnectorInstanceId
Return the unique instance identifier of the connector.- Returns:
- String name
-
needsDedicatedThread
public boolean needsDedicatedThread()Does the connector need to run in a dedicated thread.- Returns:
- boolean
-
getStartDate
Return the earliest time that this connector can run. (Null means no restriction.)- Returns:
- date
-
getStopDate
Return the latest time that this connector can run. (Null means no restriction.)- Returns:
- date
-
getIntegrationConnectorStatus
Return the status for the integration connector.- Returns:
- status object
-
getLastStatusChange
Return the date/time when the status was last changed.- Returns:
- timestamp
-
getFailingExceptionMessage
Return the message extracted from an exception returned by the connector. This is only set if the connectorStatus is FAILED. The full exception is logged in the server's audit log.- Returns:
- string message
-
getStatistics
Return the statistics logged by the connector.- Returns:
- name value pairs for the statistics
-
getLastRefreshTime
Return the date/time when the connector was last refreshed. Null means it has never been refreshed.- Returns:
- timestamp
-
getMinMinutesBetweenRefresh
public long getMinMinutesBetweenRefresh()Return the configured minimum time between calls to refresh. This gives an indication of when the next refresh is due. Null means refresh is only called at server start up and in response to an API request.- Returns:
- count
-
reinitializeConnector
Initialize a new integration connector instance. This is called from the constructor and during restart.- Parameters:
actionDescription
- description of caller's operation
-
getConfigurationProperties
Retrieve the configuration properties of the connector.- Returns:
- property map
-
updateConfigurationProperties
public void updateConfigurationProperties(String userId, String actionDescription, boolean isMergeUpdate, Map<String, Object> configurationProperties) Update the configuration properties of the connector and restart it.- Parameters:
userId
- external calleractionDescription
- external caller's activityisMergeUpdate
- should the properties be merged into the existing properties or replace themconfigurationProperties
- new configuration properties
-
updateEndpointNetworkAddress
public void updateEndpointNetworkAddress(String userId, String actionDescription, String networkAddress) Update the endpoint network address for a specific integration connector.- Parameters:
userId
- calling useractionDescription
- external caller's activitynetworkAddress
- name of a specific connector or null for all connectors and the properties to change
-
updateConnectorConnection
public void updateConnectorConnection(String userId, String actionDescription, Connection connection) Update the connection for a specific integration connector.- Parameters:
userId
- calling useractionDescription
- external caller's activityconnection
- new connection object
-
engageConnector
Call engage() method of the integration connector. This is called in a separate thread.- Parameters:
actionDescription
- external caller's activity
-
refreshConnector
Call refresh() on the connector provided it is in the correct state.- Parameters:
actionDescription
- external caller's activity
-
refreshConnectorDetails
public void refreshConnectorDetails(RegisteredIntegrationConnectorElement registeredIntegrationConnectorElement) Update the connector properties with as little disruption to the running connector.- Parameters:
registeredIntegrationConnectorElement
- new configuration information from the server
-
updateConnectorDetails
public boolean updateConnectorDetails(RegisteredIntegrationConnectorElement registeredIntegrationConnectorElement) Update the connector properties with as little disruption to the running connector.- Parameters:
registeredIntegrationConnectorElement
- new configuration information from the server- Returns:
- boolean - true if the connection has changed
-
shutdown
Shutdown the connector handler.- Parameters:
actionDescription
- external caller's activity
-
disconnectConnector
Request that the connector instance releases its resources.- Parameters:
actionDescription
- external caller's activity
-