Class IntegrationConnectorBase
java.lang.Object
org.odpi.openmetadata.frameworks.connectors.Connector
org.odpi.openmetadata.frameworks.connectors.ConnectorBase
org.odpi.openmetadata.frameworks.integration.connectors.IntegrationConnectorBase
- All Implemented Interfaces:
AuditLoggingComponent,SecureConnectorExtension,VirtualConnectorExtension,IntegrationConnector
- Direct Known Subclasses:
ApacheAtlasIntegrationConnector,BasicFilesMonitorIntegrationConnectorBase,CSVLineageImporterConnector,DistributeAuditEventsFromKafkaConnector,GovernanceActionOpenLineageIntegrationConnector,HarvestOpenMetadataConnector,HarvestSurveysConnector,JDBCIntegrationConnector,KafkaTopicIntegrationConnector,OMAGServerPlatformCatalogConnector,OpenAPIMonitorIntegrationConnector,OpenLineageCataloguerIntegrationConnector,OpenLineageEventReceiverIntegrationConnector,OpenLineageLogStoreConnectorBase,OpenMetadataProductsHarvesterConnector,OSSUnityCatalogInsideCatalogSyncConnector,OSSUnityCatalogServerSyncConnector,PostgresServerIntegrationConnector
public abstract class IntegrationConnectorBase
extends ConnectorBase
implements IntegrationConnector, AuditLoggingComponent, VirtualConnectorExtension
IntegrationConnectorBase is the base class for an integration connector. It manages the storing of the audit log for the connector
and provides a default implementation for the abstract engage() method. This method only needs to be overridden by connectors
that need to make blocking calls to wait for new metadata.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
ConnectorBase.ProtectedConnection -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AuditLogprotected RequestedCatalogTargetsManagerprotected Stringprotected final PropertyHelperFields inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
connectionBean, connectorInstanceId, embeddedConnectors, messageFormatter, secretsStoreConnectorMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidFree up any resources held since the connector is no longer needed.voidengage()This method is for blocking calls to wait for new metadata.Return the component description that is used by this connector in the audit log.protected StringgetNetworkAddress(Connector assetConnector) Retrieve the endpoint from the asset connection.protected voidpassEventToCatalogTargets(CatalogTargetEventProcessor catalogTargetEventProcessor, OpenMetadataOutTopicEvent event) Return a list of requested catalog targets for the connector.protected voidrefreshCatalogTargets(CatalogTargetIntegrator catalogTargetIntegrator) Retrieve the list of catalog targets for the connector.protected voidAdd a new listener for changes to this connector's catalog targets.voidsetAuditLog(AuditLog auditLog) Receive an audit log object that can be used to record audit log messages.voidsetConnectorName(String connectorName) Set up the connector name for logging.voidsetContext(IntegrationContext integrationContext) Set up the standard integration context for the connector.voidstart()Indicates that the connector is completely configured and can begin processing.Methods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
combineConfigurationProperties, disconnectConnectors, equals, fromCanonicalToKebabCase, fromCanonicalToSnakeCase, fromKebabToCanonicalCase, fromSnakeToCanonicalCase, getArrayConfigurationProperty, getArrayConfigurationProperty, getArrayConfigurationProperty, getBooleanConfigurationProperty, getConnection, getConnectorInstanceId, getDateConfigurationProperty, getIntConfigurationProperty, getLongConfigurationProperty, getStringConfigurationProperty, getStringConfigurationProperty, getSuppliedPlaceholderProperties, hashCode, initialize, initializeEmbeddedConnectors, initializeSecretsStoreConnector, isActive, logExceptionRecord, logRecord, logRecord, throwMissingConfigurationProperty, throwMissingEndpointAddress, throwMissingResource, throwNoAsset, throwWrongTypeOfAsset, throwWrongTypeOfResource, throwWrongTypeOfRootSchema, toStringMethods inherited from class org.odpi.openmetadata.frameworks.connectors.Connector
clearStatisticProperty, clearStatisticTimestamp, getConnectorStatistics, getStatisticCounter, getStatisticProperty, getStatisticTimestamp, incrementStatisticCounter, initializeStatisticCounter, refreshStatistics, setStatisticProperty, setStatisticTimestampMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.odpi.openmetadata.frameworks.integration.connectors.IntegrationConnector
refreshMethods inherited from interface org.odpi.openmetadata.frameworks.connectors.VirtualConnectorExtension
initializeEmbeddedConnectors
-
Field Details
-
auditLog
-
connectorName
-
integrationContext
-
propertyHelper
-
catalogTargetsManager
-
-
Constructor Details
-
IntegrationConnectorBase
public IntegrationConnectorBase()
-
-
Method Details
-
setAuditLog
Receive an audit log object that can be used to record audit log messages. The caller has initialized it with the correct component description and log destinations.- Specified by:
setAuditLogin interfaceAuditLoggingComponent- Parameters:
auditLog- audit log object
-
getConnectorComponentDescription
Return the component description that is used by this connector in the audit log.- Specified by:
getConnectorComponentDescriptionin interfaceAuditLoggingComponent- Returns:
- id, name, description, wiki page URL.
-
setConnectorName
Set up the connector name for logging.- Specified by:
setConnectorNamein interfaceIntegrationConnector- Parameters:
connectorName- connector name from the configuration
-
setContext
Set up the standard integration context for the connector.- Specified by:
setContextin interfaceIntegrationConnector- Parameters:
integrationContext- integration context.
-
start
Indicates that the connector is completely configured and can begin processing. This call can be used to register with non-blocking services.- Specified by:
startin interfaceIntegrationConnector- Overrides:
startin classConnectorBase- Throws:
ConnectorCheckedException- there is a problem within the connector.UserNotAuthorizedException- the connector was disconnected before/during start
-
getNetworkAddress
Retrieve the endpoint from the asset connection.- Parameters:
assetConnector- asset connector- Returns:
- endpoint or null
-
registerCatalogTargetChangeListener
Add a new listener for changes to this connector's catalog targets.- Parameters:
listener- listener to register
-
refreshCatalogTargets
protected void refreshCatalogTargets(CatalogTargetIntegrator catalogTargetIntegrator) throws ConnectorCheckedException Retrieve the list of catalog targets for the connector. These are extracted from the metadata store. For each one, integrateCatalogTarget() is called on the supplied catalog target integrator to perform the refresh.- Parameters:
catalogTargetIntegrator- the integration component that will process each catalog target- Throws:
ConnectorCheckedException- there is a problem with the connector. It is not able to refresh the metadata.
-
passEventToCatalogTargets
protected void passEventToCatalogTargets(CatalogTargetEventProcessor catalogTargetEventProcessor, OpenMetadataOutTopicEvent event) throws ConnectorCheckedException Return a list of requested catalog targets for the connector. These are extracted from the metadata store.- Parameters:
catalogTargetEventProcessor- the integration component that will process each catalog targetevent- event to process- Throws:
ConnectorCheckedException- there is a problem with the connector. It is not able to refresh the metadata.
-
engage
This method is for blocking calls to wait for new metadata. It is called from its own thread iff the connector is configured to have its own thread. It is recommended that the implementation returns when each blocking call completes. The integration daemon will pause a second and then call engage() again. This pattern enables the calling thread to detect the shutdown of the integration daemon. This method should be overridden if the connector needs to issue calls that wait for new metadata. If this specific implementation is called a message is logged in the audit log because there is probably a mismatch between the configuration and the connector implementation.- Specified by:
engagein interfaceIntegrationConnector- Throws:
ConnectorCheckedException- there is a problem within the connector.
-
disconnect
Free up any resources held since the connector is no longer needed.- Specified by:
disconnectin interfaceIntegrationConnector- Overrides:
disconnectin classConnectorBase- Throws:
ConnectorCheckedException- there is a problem within the connector.
-