Class OMRSRepositoryEventPublisher

All Implemented Interfaces:
OMRSInstanceEventProcessorClassificationExtension, OMRSInstanceEventProcessorInterface, OMRSTypeDefEventProcessorInterface

public class OMRSRepositoryEventPublisher extends OMRSRepositoryEventBuilder
OMRSRepositoryEventPublisher publishes TypeDef and Instance OMRS Events to the supplied OMRSTopicConnector.
  • Constructor Details

    • OMRSRepositoryEventPublisher

      public OMRSRepositoryEventPublisher(String publisherName, OMRSTopicConnector topicConnector, AuditLog auditLog)
      Typical constructor sets up the local metadata collection id for events.
      Parameters:
      publisherName - name of the cohort (or enterprise virtual repository) that this event publisher is sending events to.
      topicConnector - OMRS Topic to send requests on
      auditLog - audit log for this component.
    • OMRSRepositoryEventPublisher

      public OMRSRepositoryEventPublisher(String publisherName, List<OMRSTopicConnector> typesTopicConnectors, List<OMRSTopicConnector> instancesTopicConnectors, AuditLog auditLog)
      Typical constructor sets up the local metadata collection id for events.
      Parameters:
      publisherName - name of the cohort (or enterprise virtual repository) that this event publisher is sending events to.
      typesTopicConnectors - list of OMRS Topic connectors to send type requests on
      instancesTopicConnectors - list of OMRS Topic connectors to send type requests on
      auditLog - audit log for this component.
  • Method Details

    • setSecurityVerifier

      public void setSecurityVerifier(OpenMetadataEventsSecurity securityVerifier)
      Set up a new security verifier (the handler runs with a default verifier until this method is called). The security verifier provides authorization checks for whether individual events should be sent/received. Authorization checks are enabled through the OpenMetadataServerSecurityConnector.
      Parameters:
      securityVerifier - new security verifier
    • sendTypeDefEvent

      public void sendTypeDefEvent(String sourceName, OMRSTypeDefEvent typeDefEvent)
      Send the TypeDef event to the OMRS Topic connector (providing TypeDef Events are enabled).
      Parameters:
      sourceName - name of caller
      typeDefEvent - properties of the event to send
    • sendInstanceEvent

      public void sendInstanceEvent(String sourceName, OMRSInstanceEvent instanceEvent)
      Set the instance event to the OMRS Topic connector if the instance event is of the permitted type.
      Parameters:
      sourceName - name of caller
      instanceEvent - properties of the event to send