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, org.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent, org.odpi.openmetadata.frameworks.connectors.SecureConnectorExtension, org.odpi.openmetadata.frameworks.connectors.VirtualConnectorExtension, OpenMetadataTopic

public abstract class OpenMetadataTopicConnector extends org.odpi.openmetadata.frameworks.connectors.ConnectorBase implements OpenMetadataTopic, Runnable, org.odpi.openmetadata.frameworks.auditlog.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().
  • Constructor Summary

    Constructors
    Constructor
    Description
    Simple constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Free up any resources held since the connector is no longer needed.
    org.odpi.openmetadata.frameworks.auditlog.ComponentDescription
    Return the component description that is used by this connector in the audit log.
    Register a listener object.
    void
    run()
    This is the method called by the listener thread when it starts.
    void
    setAuditLog(org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog)
    Receive an audit log object that can be used to record audit log messages.
    void
    Indicates that the connector is completely configured and can begin processing.

    Methods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase

    equals, getConnectedAssetProperties, getConnection, getConnectorInstanceId, hashCode, initialize, initializeConnectedAssetProperties, initializeEmbeddedConnectors, initializeSecretsStoreConnector, isActive, 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

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopic

    sendEvent
  • Constructor Details

    • OpenMetadataTopicConnector

      public OpenMetadataTopicConnector()
      Simple constructor
  • Method Details

    • setAuditLog

      public void setAuditLog(org.odpi.openmetadata.frameworks.auditlog.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 org.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent
      Parameters:
      auditLog - audit log object
    • getConnectorComponentDescription

      public org.odpi.openmetadata.frameworks.auditlog.ComponentDescription getConnectorComponentDescription()
      Return the component description that is used by this connector in the audit log.
      Specified by:
      getConnectorComponentDescription in interface org.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent
      Returns:
      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
    • 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
      Parameters:
      topicListener - object implementing the OMRSTopicListener interface
      Returns:
      topic name
    • start

      public void start() throws org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException
      Indicates that the connector is completely configured and can begin processing.
      Overrides:
      start in class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException - there is a problem within the connector.
    • disconnect

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