Class OMFOutTopicClientConnector

All Implemented Interfaces:
AuditLoggingComponent, SecureConnectorExtension, VirtualConnectorExtension, OpenMetadataEventInterface, OpenMetadataTopicListener

public class OMFOutTopicClientConnector extends OpenMetadataTopicListenerConnectorBase implements OpenMetadataEventInterface
OMFOutTopicClientConnector is the java base class implementation of the client side connector that receives events from the Open Metadata Store's OutTopic.
  • Constructor Details

    • OMFOutTopicClientConnector

      public OMFOutTopicClientConnector()
  • Method Details

    • registerListener

      public void registerListener(String userId, OpenMetadataEventListener listener) throws InvalidParameterException
      Register a listener object that will be passed each of the events published by the Open Metadata Store.
      Specified by:
      registerListener in interface OpenMetadataEventInterface
      Parameters:
      userId - calling user
      listener - listener object
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
    • processEvent

      public void processEvent(String event)
      Pass an event received from the topic to each registered listener.

      This method is deliberately not synchronized. A listener may call into its server, and if that code holds a lock of its own while disconnecting this connector - which needs this connector's lock - the two threads deadlock. That is what happened when an engine host shut down while an engine action event was being delivered. The events from a topic arrive on a single listener thread, so they are still delivered one at a time and in order.
      Specified by:
      processEvent in interface OpenMetadataTopicListener
      Specified by:
      processEvent in class OpenMetadataTopicListenerConnectorBase
      Parameters:
      event - inbound event