Package org.vrspace.server.core
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
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterConnectionClosed
(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.CloseStatus status) void
afterConnectionEstablished
(org.springframework.web.socket.WebSocketSession session) void
cleanup()
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
notifyListeners
(VREvent event) void
run()
void
setup()
Methods inherited from class org.springframework.web.socket.handler.TextWebSocketHandler
handleBinaryMessage
Methods inherited from class org.springframework.web.socket.handler.AbstractWebSocketHandler
handleMessage, handleTransportError, supportsPartialMessages
-
Field Details
-
SEND_TIMEOUT
public static final int SEND_TIMEOUT- See Also:
-
BUFFER_SIZE
public static final int BUFFER_SIZE- See Also:
-
PING_PERIOD
public static final int PING_PERIOD- See Also:
-
-
Constructor Details
-
SessionManager
public SessionManager()
-
-
Method Details
-
setup
@PostConstruct public void setup() -
handleTextMessage
public void handleTextMessage(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.TextMessage message) - Overrides:
handleTextMessage
in classorg.springframework.web.socket.handler.AbstractWebSocketHandler
-
notifyListeners
-
afterConnectionEstablished
public void afterConnectionEstablished(org.springframework.web.socket.WebSocketSession session) - Specified by:
afterConnectionEstablished
in interfaceorg.springframework.web.socket.WebSocketHandler
- Overrides:
afterConnectionEstablished
in classorg.springframework.web.socket.handler.AbstractWebSocketHandler
-
login
protected Welcome login(org.springframework.web.socket.handler.ConcurrentWebSocketSessionDecorator socket) -
run
public void run() -
afterConnectionClosed
public void afterConnectionClosed(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.CloseStatus status) - Specified by:
afterConnectionClosed
in interfaceorg.springframework.web.socket.WebSocketHandler
- Overrides:
afterConnectionClosed
in classorg.springframework.web.socket.handler.AbstractWebSocketHandler
-
getClient
-
handlePongMessage
public void handlePongMessage(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.PongMessage message) - Overrides:
handlePongMessage
in classorg.springframework.web.socket.handler.AbstractWebSocketHandler
-
cleanup
@PreDestroy public void cleanup()
-