All Implemented Interfaces:
Runnable, AuditLoggingComponent, SecureConnectorExtension, 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().
  • Field Details

    • auditLog

      protected AuditLog auditLog
  • Constructor Details

    • OpenMetadataTopicConnector

      public OpenMetadataTopicConnector()
      Simple constructor
  • Method Details

    • 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
      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
      id, name, description, wiki page URL.
    • run

      public void run()
      This is the method called by the listener thread when it starts.
      Specified by:
      run in interface Runnable
    • checkForIncomingEvents

      protected List<IncomingEvent> checkForIncomingEvents()
      Look to see if there is one of more new events to process.
      a list of received events or null
    • checkForEvents

      @Deprecated protected List<String> checkForEvents()
      Use checkForIncomingEvents() instead.
      Checks for events. Only used if checkForIncomingEvents() has not been overridden.
      list of events
    • registerListener

      public String registerListener(OpenMetadataTopicListener topicListener)
      Register a listener object. This object will be supplied with all the events received on the topic.
      Specified by:
      registerListener in interface OpenMetadataTopic
      topicListener - object implementing the OMRSTopicListener interface
      topic name
    • start

      public void start() throws ConnectorCheckedException
      Indicates that the connector is completely configured and can begin processing.
      start in class ConnectorBase
      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.
      disconnect in class ConnectorBase
      ConnectorCheckedException - there is a problem within the connector.