Class InboxEventFactory

    • Constructor Detail

      • InboxEventFactory

        public InboxEventFactory()
        Constructs a new InboxEventFactory.
    • Method Detail

      • createEventByType

        protected Event createEventByType​(String eventType,
                                          String topic,
                                          String payload,
                                          @Nullable String source)
                                   throws Exception
        Description copied from class: AbstractEventFactory
        Create a new event instance based on the event type.
        Specified by:
        createEventByType in class AbstractEventFactory
        Parameters:
        eventType - the event type
        topic - the topic
        payload - the payload
        source - the source, can be null
        Returns:
        the created event instance
        Throws:
        Exception - if the creation of the event fails
      • createAddedEvent

        public static InboxAddedEvent createAddedEvent​(DiscoveryResult discoveryResult)
        Creates an inbox added event.
        Parameters:
        discoveryResult - the discovery result
        Returns:
        the created inbox added event
        Throws:
        IllegalArgumentException - if discoveryResult is null
      • createRemovedEvent

        public static InboxRemovedEvent createRemovedEvent​(DiscoveryResult discoveryResult)
        Creates an inbox removed event.
        Parameters:
        discoveryResult - the discovery result
        Returns:
        the created inbox removed event
        Throws:
        IllegalArgumentException - if discoveryResult is null
      • createUpdatedEvent

        public static InboxUpdatedEvent createUpdatedEvent​(DiscoveryResult discoveryResult)
        Creates an inbox updated event.
        Parameters:
        discoveryResult - the discovery result
        Returns:
        the created inbox updated event
        Throws:
        IllegalArgumentException - if discoveryResult is null