Class OpenMetadataTopicConnector
java.lang.Object
org.odpi.openmetadata.frameworks.connectors.Connector
org.odpi.openmetadata.frameworks.connectors.ConnectorBase
org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicConnector
- All Implemented Interfaces:
Runnable
,AuditLoggingComponent
,SecureConnectorExtension
,VirtualConnectorExtension
,OpenMetadataTopic
- Direct Known Subclasses:
InMemoryOpenMetadataTopicConnector
,KafkaOpenMetadataTopicConnector
public abstract class OpenMetadataTopicConnector
extends ConnectorBase
implements OpenMetadataTopic, Runnable, AuditLoggingComponent
OpenMetadataTopicConnector provides the support for the registration of listeners and the distribution of
incoming events to the registered listeners. An implementation of the OpenMetadataTopicConnector needs to
extend this class to include the interaction with the eventing/messaging layer.
- For inbound events it should call the protected distributeEvents() method.
- For outbound events, callers will invoke the sendEvent() method.
- When the server no longer needs the topic, it will call disconnect().
-
Nested Class Summary
Nested classes/interfaces inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
ConnectorBase.ProtectedConnection
-
Field Summary
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
connectedAssetProperties, connectionBean, connectionProperties, connectorInstanceId, embeddedConnectors, messageFormatter, secretsStoreConnectorMap
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Use checkForIncomingEvents() instead.protected List<IncomingEvent>
Look to see if there is one of more new events to process.void
Free up any resources held since the connector is no longer needed.Return the component description that is used by this connector in the audit log.registerListener
(OpenMetadataTopicListener topicListener) Register a listener object.void
run()
This is the method called by the listener thread when it starts.void
setAuditLog
(AuditLog auditLog) Receive an audit log object that can be used to record audit log messages.void
start()
Indicates that the connector is completely configured and can begin processing.Methods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
combineConfigurationProperties, disconnectConnectors, equals, getArrayConfigurationProperty, getAssetTypeName, getBooleanConfigurationProperty, getConnectedAssetProperties, getConnection, getConnectorInstanceId, getDateConfigurationProperty, getIntConfigurationProperty, getLongConfigurationProperty, getNetworkAddresses, getStringConfigurationProperty, getSuppliedPlaceholderProperties, hashCode, initialize, initializeConnectedAssetProperties, initializeEmbeddedConnectors, initializeSecretsStoreConnector, isActive, logExceptionRecord, logRecord, logRecord, throwMissingConfigurationProperty, throwMissingResource, throwNoAsset, throwWrongTypeOfAsset, throwWrongTypeOfResource, throwWrongTypeOfRootSchema, toString
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.Connector
clearStatisticProperty, clearStatisticTimestamp, getConnectorStatistics, getStatisticCounter, getStatisticProperty, getStatisticTimestamp, incrementStatisticCounter, initializeStatisticCounter, setStatisticProperty, setStatisticTimestamp
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopic
sendEvent
-
Field Details
-
auditLog
-
-
Constructor Details
-
OpenMetadataTopicConnector
public OpenMetadataTopicConnector()Simple constructor
-
-
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:
setAuditLog
in interfaceAuditLoggingComponent
- Parameters:
auditLog
- audit log object
-
getConnectorComponentDescription
Return the component description that is used by this connector in the audit log.- Specified by:
getConnectorComponentDescription
in interfaceAuditLoggingComponent
- Returns:
- id, name, description, wiki page URL.
-
run
public void run()This is the method called by the listener thread when it starts. -
checkForIncomingEvents
Look to see if there is one of more new events to process.- Returns:
- a list of received events or null
-
checkForEvents
Deprecated.Use checkForIncomingEvents() instead.Checks for events. Only used if checkForIncomingEvents() has not been overridden.- Returns:
- list of events
-
registerListener
Register a listener object. This object will be supplied with all the events received on the topic.- Specified by:
registerListener
in interfaceOpenMetadataTopic
- Parameters:
topicListener
- object implementing the OMRSTopicListener interface- Returns:
- topic name
-
start
Indicates that the connector is completely configured and can begin processing.- Overrides:
start
in classConnectorBase
- Throws:
ConnectorCheckedException
- there is a problem within the connector.
-
disconnect
Free up any resources held since the connector is no longer needed.- Overrides:
disconnect
in classConnectorBase
- Throws:
ConnectorCheckedException
- there is a problem within the connector.
-