Class OpenMetadataTopicConsumerBase
- java.lang.Object
-
- org.odpi.openmetadata.frameworks.connectors.Connector
-
- org.odpi.openmetadata.frameworks.connectors.ConnectorBase
-
- org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicConsumerBase
-
- All Implemented Interfaces:
AuditLoggingComponent,VirtualConnectorExtension
- Direct Known Subclasses:
OpenMetadataTopicListenerConnectorBase,OpenMetadataTopicSenderConnectorBase
public class OpenMetadataTopicConsumerBase extends ConnectorBase implements VirtualConnectorExtension, AuditLoggingComponent
OpenMetadataTopicConnectorBase is a base class to topic connectors that only send events on the embedded event bus connector
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
ConnectorBase.ProtectedConnection
-
-
Field Summary
Fields Modifier and Type Field Description protected AuditLogauditLogprotected StringconnectionNameprotected List<OpenMetadataTopicConnector>eventBusConnectors-
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
connectedAssetProperties, connectionBean, connectionProperties, connectorInstanceId, securedProperties
-
-
Constructor Summary
Constructors Constructor Description OpenMetadataTopicConsumerBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddisconnect()Free up any resources held since the connector is no longer needed.ComponentDescriptiongetConnectorComponentDescription()Return the component description that is used by this connector in the audit log.voidinitializeEmbeddedConnectors(List<Connector> embeddedConnectors)Set up the list of connectors that this virtual connector will use to support its interface.voidsetAuditLog(AuditLog auditLog)Receive an audit log object that can be used to record audit log messages.voidstart()Indicates that the connector is completely configured and can begin processing.protected voidvalidateEventBusConnectors(String methodName)Validates that there is at least one event bus connector receiving events.-
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
equals, getConnectedAssetProperties, getConnection, getConnectorInstanceId, hashCode, initialize, initializeConnectedAssetProperties, isActive, toString
-
-
-
-
Field Detail
-
eventBusConnectors
protected List<OpenMetadataTopicConnector> eventBusConnectors
-
connectionName
protected String connectionName
-
auditLog
protected AuditLog auditLog
-
-
Method Detail
-
initializeEmbeddedConnectors
public void initializeEmbeddedConnectors(List<Connector> embeddedConnectors)
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:
initializeEmbeddedConnectorsin interfaceVirtualConnectorExtension- Parameters:
embeddedConnectors- list of connectors
-
setAuditLog
public void setAuditLog(AuditLog auditLog)
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
public ComponentDescription 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.
-
validateEventBusConnectors
protected void validateEventBusConnectors(String methodName) throws ConnectorCheckedException
Validates that there is at least one event bus connector receiving events.- Parameters:
methodName- calling method- Throws:
ConnectorCheckedException- no event bus connectors available.
-
start
public void start() throws ConnectorCheckedExceptionIndicates that the connector is completely configured and can begin processing. OMRSTopicConnector needs to pass on the start() to its embedded connectors.- Overrides:
startin classConnectorBase- Throws:
ConnectorCheckedException- there is a problem within the connector.
-
disconnect
public void disconnect() throws ConnectorCheckedExceptionFree up any resources held since the connector is no longer needed.- Overrides:
disconnectin classConnectorBase- Throws:
ConnectorCheckedException- there is a problem within the connector.
-
-