Interface CanHandleErrors

All Known Implementing Classes:
StringWebSocketClient

public interface CanHandleErrors
  • Method Details

    • getErrorHandlers

      List<Consumer<Throwable>> getErrorHandlers()
      Returns a list of all registered web socket error handlers.
      Returns:
      The list of web socket error handlers.
    • addErrorHandler

      default void addErrorHandler(Consumer<Throwable> handler)
      Register a new error handler.
      Parameters:
      handler - a callback function, which accepts the received exception instance as a parameter
    • removeErrorHandlers

      default void removeErrorHandlers()
      Removes existing error handlers.