Class OpenMetadataTopicListenerConnectorBase
java.lang.Object
org.odpi.openmetadata.frameworks.connectors.Connector
org.odpi.openmetadata.frameworks.connectors.ConnectorBase
org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicConsumerBase
org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicListenerConnectorBase
- All Implemented Interfaces:
AuditLoggingComponent
,SecureConnectorExtension
,VirtualConnectorExtension
,OpenMetadataTopicListener
- Direct Known Subclasses:
AssetConsumerOutTopicClientConnector
,AssetManagerOutTopicClientConnector
,AssetOwnerOutTopicClientConnector
,CommunityProfileOutTopicClientConnector
,DataManagerOutTopicClientConnector
,DigitalArchitectureOutTopicClientConnector
,GovernanceEngineOutTopicClientConnector
,GovernanceServerOutTopicClientConnector
,ITInfrastructureOutTopicClientConnector
,SecurityManagerOutTopicClientConnector
,StewardshipActionOutTopicClientConnector
public abstract class OpenMetadataTopicListenerConnectorBase
extends OpenMetadataTopicConsumerBase
implements OpenMetadataTopicListener, VirtualConnectorExtension
OpenMetadataTopicListenerConnectorBase is a base class for a connector that is going to embed the OpenMetadataTopicConnector
and register a listener with it. It manages the instances of the OpenMetadataTopicConnector as they are passed as a
list of connectors from the ConnectorBroker and registers itself with the OpenMetadataTopicConnector.
Subclasses just need to manage their list of listeners and override the processEvent() method. When it is called, the subclass
-
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.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicConsumerBase
auditLog, connectionName, embeddedConnectors, eventBusConnectors
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
connectedAssetProperties, connectionBean, connectionProperties, connectorInstanceId, secretsStoreConnectorMap
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Free up any resources held since the connector is no longer needed.protected <T> T
getEventBean
(String event, Class<T> eventClass) Parse the event and return it to a Java bean.void
initializeEmbeddedConnectors
(List<Connector> embeddedConnectors) Set up the list of connectors that this virtual connector will use to support its interface.abstract void
processEvent
(String event) Method to pass an event received on topic.Methods inherited from class org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicConsumerBase
getConnectorComponentDescription, setAuditLog, start, validateEventBusConnectors
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
disconnectConnectors, equals, getArrayConfigurationProperty, getAssetTypeName, getBooleanConfigurationProperty, getConnectedAssetProperties, getConnection, getConnectorInstanceId, getIntConfigurationProperty, getNetworkAddresses, getStringConfigurationProperty, getSuppliedPlaceholderProperties, hashCode, initialize, initializeConnectedAssetProperties, initializeSecretsStoreConnector, isActive, 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
-
Constructor Details
-
OpenMetadataTopicListenerConnectorBase
public OpenMetadataTopicListenerConnectorBase()
-
-
Method Details
-
initializeEmbeddedConnectors
Set up the list of connectors that this virtual connector will use to support its interface. The connectors are initialized waiting to start. When start() is called on the virtual connector, it needs to pass start() to each of the embedded connectors. Similarly for disconnect().- Specified by:
initializeEmbeddedConnectors
in interfaceVirtualConnectorExtension
- Overrides:
initializeEmbeddedConnectors
in classOpenMetadataTopicConsumerBase
- Parameters:
embeddedConnectors
- list of connectors
-
processEvent
Method to pass an event received on topic.- Specified by:
processEvent
in interfaceOpenMetadataTopicListener
- Parameters:
event
- inbound event
-
getEventBean
Parse the event and return it to a Java bean.- Type Parameters:
T
- the name of the class- Parameters:
event
- event as a StringeventClass
- class of the Java bean.- Returns:
- Java bean
- Throws:
Exception
- something went wrong in the parsing process.
-
disconnect
Free up any resources held since the connector is no longer needed.- Overrides:
disconnect
in classOpenMetadataTopicConsumerBase
- Throws:
ConnectorCheckedException
- there is a problem within the connector.
-