Class EndpointDispatcher

java.lang.Object
javax.websocket.Endpoint
org.javalite.activeweb.websockets.EndpointDispatcher
All Implemented Interfaces:
javax.websocket.MessageHandler, javax.websocket.MessageHandler.Whole<String>

public class EndpointDispatcher extends javax.websocket.Endpoint implements javax.websocket.MessageHandler.Whole<String>
Interesting advice: https://stackoverflow.com/questions/50114490/java-websocket-session-times-out-regardless-the-value-of-setmaxidletimeout Another: https://yishanhe.net/how-to-keep-your-websocket-session-alive/ Java Client: https://github.com/eugenp/tutorials/tree/master/spring-boot-modules/spring-boot-client/src/main/java/com/baeldung/websocket/client
  • Nested Class Summary

    Nested classes/interfaces inherited from interface javax.websocket.MessageHandler

    javax.websocket.MessageHandler.Partial<T extends Object>, javax.websocket.MessageHandler.Whole<T extends Object>
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onClose​(javax.websocket.Session session, javax.websocket.CloseReason closeReason)
     
    void
    onError​(javax.websocket.Session session, Throwable e)
     
    void
    onMessage​(String message)
     
    void
    onOpen​(javax.websocket.Session session, javax.websocket.EndpointConfig config)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EndpointDispatcher

      public EndpointDispatcher()
  • Method Details

    • onOpen

      public final void onOpen(javax.websocket.Session session, javax.websocket.EndpointConfig config)
      Specified by:
      onOpen in class javax.websocket.Endpoint
    • onClose

      public final void onClose(javax.websocket.Session session, javax.websocket.CloseReason closeReason)
      Overrides:
      onClose in class javax.websocket.Endpoint
    • onError

      public final void onError(javax.websocket.Session session, Throwable e)
      Overrides:
      onError in class javax.websocket.Endpoint
    • onMessage

      public void onMessage(String message)
      Specified by:
      onMessage in interface javax.websocket.MessageHandler.Whole<String>