Package io.appium.java_client.ws
Interface CanHandleErrors
-
- All Known Implementing Classes:
StringWebSocketClient
public interface CanHandleErrors
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
addErrorHandler(java.util.function.Consumer<java.lang.Throwable> handler)
Register a new error handler.java.util.List<java.util.function.Consumer<java.lang.Throwable>>
getErrorHandlers()
Returns a list of all registered web socket error handlers.default void
removeErrorHandlers()
Removes existing error handlers.
-
-
-
Method Detail
-
getErrorHandlers
java.util.List<java.util.function.Consumer<java.lang.Throwable>> getErrorHandlers()
Returns a list of all registered web socket error handlers.- Returns:
- The list of web socket error handlers.
-
addErrorHandler
default void addErrorHandler(java.util.function.Consumer<java.lang.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.
-
-