Class OpenMetadataNotificationService

All Implemented Interfaces:
AuditLoggingComponent, SecureConnectorExtension, VirtualConnectorExtension, WatchdogActionService

public class OpenMetadataNotificationService extends WatchdogActionServiceConnector
OpenMetadataNotificationService is a Watchdog Governance Action Service that listens for new or refreshed Assets and kicks off a governance action process to validate that this Asset is correctly set up. It is designed to run continuously and so does not set up completion status or guards. This means its Governance Action entity is never completed and this service is restarted each time the hosting engine is restarted.
  • Constructor Details

    • OpenMetadataNotificationService

      public OpenMetadataNotificationService()
  • Method Details

    • start

      Indicates that the governance action service is completely configured and can begin processing. This is a standard method from the Open Connector Framework (OCF) so be sure to call super.start() at the start of your overriding version.
      Overrides:
      start in class WatchdogActionServiceConnector
      Throws:
      ConnectorCheckedException - there is a problem within the governance action service.
      UserNotAuthorizedException - the connector was disconnected before/during start
    • processEvent

      public void processEvent(OpenMetadataOutTopicEvent event) throws GovernanceServiceException
      This method is called each time a metadata change is received. It triggers a governance action process to validate and enrich the asset as required.
      Specified by:
      processEvent in class WatchdogActionServiceConnector
      Parameters:
      event - event containing details of a change to an open metadata element.
      Throws:
      GovernanceServiceException - reports that the event can not be processed (this is logged but no other action is taken). The listener will continue to be called until the watchdog governance action service declares it is complete or administrator action shuts down the service.
    • disconnect

      public void disconnect() throws ConnectorCheckedException
      Disconnect is called either because this governance action service called governanceContext.recordCompletionStatus() or the administrator requested this governance action service stop running or the hosting server is shutting down. If disconnect completes before the governance action service records its completion status then the governance action service is restarted either at the administrator's request or the next time the server starts. If you do not want this governance action service restarted, be sure to record the completion status in disconnect(). The disconnect() method is a standard method from the Open Connector Framework (OCF). If you need to override this method be sure to call super.disconnect() in your version.
      Overrides:
      disconnect in class WatchdogActionServiceConnector
      Throws:
      ConnectorCheckedException - there is a problem within the governance action service.