public interface CanHandleMessages<T>
Modifier and Type | Method and Description |
---|---|
default void |
addMessageHandler(java.util.function.Consumer<T> handler)
Register a new message handler.
|
java.util.List<java.util.function.Consumer<T>> |
getMessageHandlers()
Returns a list of all registered web socket messages handlers.
|
default void |
removeMessageHandlers()
Removes existing message handlers.
|
java.util.List<java.util.function.Consumer<T>> getMessageHandlers()
default void addMessageHandler(java.util.function.Consumer<T> handler)
handler
- a callback function, which accepts the received message as a parameterdefault void removeMessageHandlers()