Class WatchdogGovernanceActionService

java.lang.Object
org.odpi.openmetadata.frameworks.connectors.Connector
org.odpi.openmetadata.frameworks.connectors.ConnectorBase
org.odpi.openmetadata.frameworks.governanceaction.GovernanceActionServiceConnector
org.odpi.openmetadata.frameworks.governanceaction.WatchdogGovernanceActionService
All Implemented Interfaces:
org.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent, org.odpi.openmetadata.frameworks.connectors.SecureConnectorExtension, org.odpi.openmetadata.frameworks.connectors.VirtualConnectorExtension, GovernanceActionService

public abstract class WatchdogGovernanceActionService extends GovernanceActionServiceConnector
The watchdog governance action service is responsible for monitoring changes to the metadata elements and then initiating further governance activity. It can be written as a log running service that is detecting multiple events over time, or it may just be looking for a specific change before completing. To create your own watchdog governance action service, create a new class that extends this class along with another class that extends the GovernanceActionServiceProviderBase class to act as its connector provider. Add a start() method that begins by calling super.start() and then registers a listener to wait for the desired event(s). THe listener is called each time an event occurs. It can use the methods on the governance context to:
  • Create a governance action to drive a specific governance action service.
  • Initiate a governance action process.
  • Create an incident report that will be processed by the incident report governance processes.
When the watchdog governance action service is complete, it should call governanceContext.recordCompletionStatus() and then return. The recordCompletionStatus() call will include guards that are used to determine the next step if any.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Disconnect is called either because this governance action service called governanceContext.recordCompletionStatus() or the administer requested this governance action service stop running or the hosting server is shutting down.
    void
    Set up details of the governance action request and access to the metadata store.
    void
    Indicates that the governance action service is completely configured and can begin processing.

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

    equals, getConnectedAssetProperties, getConnection, getConnectorInstanceId, hashCode, initialize, initializeConnectedAssetProperties, 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
  • Constructor Details

    • WatchdogGovernanceActionService

      public WatchdogGovernanceActionService()
  • Method Details

    • setGovernanceContext

      public void setGovernanceContext(GovernanceActionContext governanceContext)
      Set up details of the governance action request and access to the metadata store. This method is called before start and should not be null
      Specified by:
      setGovernanceContext in class GovernanceActionServiceConnector
      Parameters:
      governanceContext - specialist context for this type of governance action.
    • start

      public void start() throws org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException
      Indicates that the governance action service is completely configured and can begin processing. This is where the watchdog governance action service registers its listener. The watchdog listener will then be called for each event. It can use the context to initiate other governance activity or call governanceContext.recordCompletionStatus() to end. This is a standard method from the Open Connector Framework (OCF) so be sure to call super.start() in your version.
      Overrides:
      start in class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException - there is a problem within the governance action service.
    • disconnect

      public void disconnect() throws org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException
      Disconnect is called either because this governance action service called governanceContext.recordCompletionStatus() or the administer 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 GovernanceActionServiceConnector
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException - there is a problem within the governance action service.