Class StewardshipActionOutTopicPublisher


  • public class StewardshipActionOutTopicPublisher
    extends Object
    StewardshipActionOutTopicPublisher is responsible for sending events on the IT Infrastructure OMAS's out topic. It is called from the IT Infrastructure OMAS's OMRS Topic Listener.
    • Constructor Detail

      • StewardshipActionOutTopicPublisher

        public StewardshipActionOutTopicPublisher​(StewardshipActionOutTopicServerConnector outTopicServerConnector,
                                                  String outTopicName,
                                                  AuditLog outTopicAuditLog,
                                                  OMRSRepositoryHelper repositoryHelper,
                                                  String serviceName,
                                                  String serverName)
        Constructor for the publisher.
        Parameters:
        outTopicServerConnector - connector to the out topic
        outTopicName - name of the out topic
        outTopicAuditLog - logging destination if anything goes wrong.
        repositoryHelper - helper object to parse entity/relationship objects
        serviceName - name of this component
        serverName - local server name
    • Method Detail

      • publishEntityEvent

        public void publishEntityEvent​(EntityDetail entity,
                                       StewardshipActionEventType eventType)
        Send the event to the embedded event bus connector(s).
        Parameters:
        entity - entity that is the subject of the event
        eventType - type of event
      • publishEntityEvent

        public void publishEntityEvent​(StewardshipActionEventType eventType,
                                       EntityDetail entity,
                                       EntityDetail previousEntity,
                                       Classification newClassification,
                                       Classification previousClassification)
        Send the event to the embedded event bus connector(s).
        Parameters:
        entity - entity that is the subject of the event
        previousEntity - previous version of the entity
        eventType - type of event
        newClassification - latest classification information (if the event relates to a classification)
        previousClassification - previous classification information (if the event relates to a classification)
      • disconnect

        public void disconnect()
        Shutdown the publishing process.