Interface ExceptionHandler<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void handleEventException​(java.lang.Throwable ex, long sequence, T event)
      Strategy for handling uncaught exceptions when processing an event.
      void handleOnShutdownException​(java.lang.Throwable ex)
      Callback to notify of an exception during EventHandlerBase.onShutdown()
      void handleOnStartException​(java.lang.Throwable ex)
      Callback to notify of an exception during EventHandlerBase.onStart()
    • Method Detail

      • handleEventException

        void handleEventException​(java.lang.Throwable ex,
                                  long sequence,
                                  T event)

        Strategy for handling uncaught exceptions when processing an event.

        If the strategy wishes to terminate further processing by the BatchEventProcessor then it should throw a RuntimeException.

        Parameters:
        ex - the exception that propagated from the EventHandler.
        sequence - of the event which cause the exception.
        event - being processed when the exception occurred. This can be null.
      • handleOnStartException

        void handleOnStartException​(java.lang.Throwable ex)
        Callback to notify of an exception during EventHandlerBase.onStart()
        Parameters:
        ex - throw during the starting process.
      • handleOnShutdownException

        void handleOnShutdownException​(java.lang.Throwable ex)
        Callback to notify of an exception during EventHandlerBase.onShutdown()
        Parameters:
        ex - throw during the shutdown process.