Class SessionManager

java.lang.Object
org.springframework.web.socket.handler.AbstractWebSocketHandler
org.springframework.web.socket.handler.TextWebSocketHandler
org.vrspace.server.core.SessionManager
All Implemented Interfaces:
Runnable, org.springframework.web.socket.WebSocketHandler
Direct Known Subclasses:
ServerSessionManager

@Component public class SessionManager extends org.springframework.web.socket.handler.TextWebSocketHandler implements Runnable
Keeps track all WebSocket sessions.
Author:
joe
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    afterConnectionClosed(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.CloseStatus status)
     
    void
    afterConnectionEstablished(org.springframework.web.socket.WebSocketSession session)
     
    void
     
     
    void
    handlePongMessage(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.PongMessage message)
     
    void
    handleTextMessage(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.TextMessage message)
     
    protected Welcome
    login(org.springframework.web.socket.handler.ConcurrentWebSocketSessionDecorator socket)
     
    void
    run()
     

    Methods inherited from class org.springframework.web.socket.handler.TextWebSocketHandler

    handleBinaryMessage

    Methods inherited from class org.springframework.web.socket.handler.AbstractWebSocketHandler

    handleMessage, handleTransportError, supportsPartialMessages

    Methods inherited from class java.lang.Object

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

  • Constructor Details

    • SessionManager

      public SessionManager()
  • Method Details

    • handleTextMessage

      public void handleTextMessage(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.TextMessage message)
      Overrides:
      handleTextMessage in class org.springframework.web.socket.handler.AbstractWebSocketHandler
    • afterConnectionEstablished

      public void afterConnectionEstablished(org.springframework.web.socket.WebSocketSession session)
      Specified by:
      afterConnectionEstablished in interface org.springframework.web.socket.WebSocketHandler
      Overrides:
      afterConnectionEstablished in class org.springframework.web.socket.handler.AbstractWebSocketHandler
    • login

      protected Welcome login(org.springframework.web.socket.handler.ConcurrentWebSocketSessionDecorator socket)
    • run

      public void run()
      Specified by:
      run in interface Runnable
    • afterConnectionClosed

      public void afterConnectionClosed(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.CloseStatus status)
      Specified by:
      afterConnectionClosed in interface org.springframework.web.socket.WebSocketHandler
      Overrides:
      afterConnectionClosed in class org.springframework.web.socket.handler.AbstractWebSocketHandler
    • getClient

      public Client getClient(Long id)
    • handlePongMessage

      public void handlePongMessage(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.PongMessage message)
      Overrides:
      handlePongMessage in class org.springframework.web.socket.handler.AbstractWebSocketHandler
    • cleanup

      @PreDestroy public void cleanup()