Class UnprocessedEvent<EventT>

  • Type Parameters:
    EventT -

    public abstract class UnprocessedEvent<EventT>
    extends java.lang.Object
    Combines the source event which failed to process with the failure reason.
    • Constructor Detail

      • UnprocessedEvent

        public UnprocessedEvent()
    • Method Detail

      • create

        public static <EventT> UnprocessedEvent<EventT> create​(EventT event,
                                                               UnprocessedEvent.Reason reason)
        Create new unprocessed event.
        Type Parameters:
        EventT - type of the event
        Parameters:
        event - failed event
        reason - for failure
        Returns:
      • create

        public static <EventT> UnprocessedEvent<EventT> create​(EventT event,
                                                               java.lang.Exception exception)
        Create new unprocessed event which failed due to an exception thrown.
        Type Parameters:
        EventT - type of the event
        Parameters:
        event - which failed
        exception - which caused the failure
        Returns:
      • getEvent

        public abstract EventT getEvent()
      • getExplanation

        @Nullable
        public abstract java.lang.String getExplanation()