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, SecureConnectorExtension, 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
  • Field Details

  • Constructor Details

    • OpenMetadataTopicConsumerBase

      public OpenMetadataTopicConsumerBase()
  • Method Details

    • 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:
      initializeEmbeddedConnectors in interface VirtualConnectorExtension
      Overrides:
      initializeEmbeddedConnectors in class ConnectorBase
      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:
      setAuditLog in interface AuditLoggingComponent
      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:
      getConnectorComponentDescription in interface AuditLoggingComponent
      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 ConnectorCheckedException
      Indicates that the connector is completely configured and can begin processing. OMRSTopicConnector needs to pass on the start() to its embedded connectors.
      Overrides:
      start in class ConnectorBase
      Throws:
      ConnectorCheckedException - there is a problem within the connector.
    • disconnect

      public void disconnect() throws ConnectorCheckedException
      Free up any resources held since the connector is no longer needed.
      Overrides:
      disconnect in class ConnectorBase
      Throws:
      ConnectorCheckedException - there is a problem within the connector.