Class GovernanceContextClientBase

All Implemented Interfaces:
ActionControlInterface, GovernanceActionProcessInterface, GovernanceCompletionInterface, WatchdogEventInterface
Direct Known Subclasses:
GovernanceContextClient

public class GovernanceContextClientBase extends OpenGovernanceClientBase implements WatchdogEventInterface
GovernanceContextClientBase sits in the governance context of a governance action service when it is running in the engine host OMAG server. It is, however, shared by all the governance action services running in an engine service so that we only need one connector to the topic listener for the watchdog governance services.
  • Field Details

  • Constructor Details

    • GovernanceContextClientBase

      public GovernanceContextClientBase(String serverName, String serverPlatformURLRoot, String localServerSecretsStoreProvider, String localServerSecretsStoreLocation, String localServerSecretsStoreCollection, int maxPageSize, AuditLog auditLog) throws InvalidParameterException
      Create a new client with no authentication embedded in the HTTP request.
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      localServerSecretsStoreProvider - secrets store connector for bearer token
      localServerSecretsStoreLocation - secrets store location for bearer token
      localServerSecretsStoreCollection - secrets store collection for bearer token
      maxPageSize - pre-initialized parameter limit
      auditLog - logging destination
      Throws:
      InvalidParameterException - a problem creating the client-side components to issue any REST API calls.
  • Method Details

    • setListenerManager

      public void setListenerManager(GovernanceListenerManager governanceListenerManager)
      Set up the listener manager. Called once for each governance engine handler.
      Parameters:
      governanceListenerManager - aggregates listeners from governance services
    • registerListener

      public void registerListener(String listenerId, WatchdogGovernanceListener listener, List<OpenMetadataEventType> interestingEventTypes, List<String> interestingMetadataTypes, String specificInstance) throws InvalidParameterException
      Register a listener to receive events about changes to metadata elements in the open metadata store. There can be only one registered listener. If this method is called more than once, the new parameters replace the existing parameters. This means the watchdog governance action service can change the listener and the parameters that control the types of events received while it is running.

      The types of events passed to the listener are controlled by the combination of the interesting event types and the interesting metadata types. That is an event is only passed to the listener if it matches both the interesting event types and the interesting metadata types.

      If specific instance, interestingEventTypes or interestingMetadataTypes are null, it defaults to "any". If the listener parameter is null, no more events are passed to the listener.
      Specified by:
      registerListener in interface WatchdogEventInterface
      Parameters:
      listenerId - identifier used to maintain topic event pointer in event manager
      listener - listener object to receive events
      interestingEventTypes - types of events that should be passed to the listener
      interestingMetadataTypes - types of elements that are the subject of the interesting event types
      specificInstance - unique identifier of a specific instance to watch for
      Throws:
      InvalidParameterException - one or more of the type names are unrecognized
    • disconnectListener

      public void disconnectListener(String listenerId)
      Called during the disconnect processing of the watchdog governance action service.
      Specified by:
      disconnectListener in interface WatchdogEventInterface
      Parameters:
      listenerId - identifier used to maintain topic event pointer in event manager