Package rife.engine

Interface SseErrorListener

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface SseErrorListener
The method of a SseErrorListener will be executed when an event couldn't be converted or delivered to a SseBroadcaster. You register it with whatever sends the events to that broadcaster, for instance through SseGqmBridge.onError.

Such a failure happens after the operation that triggered it has completed, which means that it can't affect the outcome of that operation anymore. These listeners are how you can find out that something went wrong. When no listener has been registered, the failures are logged to the rife.engine logger instead.

Since:
1.10
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Executed when an event couldn't be converted or delivered.
  • Method Details

    • errorOccurred

      void errorOccurred(Throwable error)
      Executed when an event couldn't be converted or delivered.

      This method will be executed on the thread that was performing the work that failed.

      Parameters:
      error - the exception that was thrown
      Since:
      1.10