Interface EventFactory

    • Method Detail

      • createEvent

        Event createEvent​(String eventType,
                          String topic,
                          String payload,
                          @Nullable String source)
                   throws Exception
        Create a new event instance of a specific event type.
        Parameters:
        eventType - the event type
        topic - the topic
        payload - the payload
        source - the source (can be null)
        Returns:
        the created event instance (not null)
        Throws:
        IllegalArgumentException - if eventType, topic or payload is null or empty
        IllegalArgumentException - if the eventType is not supported
        Exception - if the creation of the event has failed
      • getSupportedEventTypes

        Set<String> getSupportedEventTypes()
        Returns a list of all supported event types of this factory.
        Returns:
        the supported event types (not null)