Package 

Class WsConfig


  • 
    public class WsConfig
    
                        

    Holds the different WebSocket handlers for a specific WsEntry or the WebSocket logger.

    • Method Summary

      Modifier and Type Method Description
      void onConnect(@NotNull() WsConnectHandler wsConnectHandler) Add a WsConnectHandler to the WsHandler.The handler is called when a WebSocket client connects.
      void onMessage(@NotNull() WsMessageHandler wsMessageHandler) Add a WsMessageHandler to the WsHandler.The handler is called when a WebSocket client sendsa String message.
      void onBinaryMessage(@NotNull() WsBinaryMessageHandler wsBinaryMessageHandler) Add a WsBinaryMessageHandler to the WsHandler.The handler is called when a WebSocket client sendsa binary message.
      void onClose(@NotNull() WsCloseHandler wsCloseHandler) Add a WsCloseHandler to the WsHandler.The handler is called when a WebSocket client closesthe connection.
      void onError(@NotNull() WsErrorHandler wsErrorHandler) Add a wsErrorHandler to the WsHandler.The handler is called when an error is detected.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • onConnect

         void onConnect(@NotNull() WsConnectHandler wsConnectHandler)

        Add a WsConnectHandler to the WsHandler.The handler is called when a WebSocket client connects.

      • onMessage

         void onMessage(@NotNull() WsMessageHandler wsMessageHandler)

        Add a WsMessageHandler to the WsHandler.The handler is called when a WebSocket client sendsa String message.

      • onClose

         void onClose(@NotNull() WsCloseHandler wsCloseHandler)

        Add a WsCloseHandler to the WsHandler.The handler is called when a WebSocket client closesthe connection. The handler is not called in case ofnetwork issues, only when the client actively closes theconnection (or times out).

      • onError

         void onError(@NotNull() WsErrorHandler wsErrorHandler)

        Add a wsErrorHandler to the WsHandler.The handler is called when an error is detected.