@Component
public class WebSocketHandler
extends org.springframework.web.socket.handler.TextWebSocketHandler
Constructor and Description |
---|
WebSocketHandler(org.springframework.data.redis.core.RedisTemplate<String,Serializable> redisTemplate) |
Modifier and Type | Method and Description |
---|---|
void |
afterConnectionClosed(org.springframework.web.socket.WebSocketSession session,
org.springframework.web.socket.CloseStatus status) |
void |
afterConnectionEstablished(org.springframework.web.socket.WebSocketSession session) |
protected void |
handleTextMessage(org.springframework.web.socket.WebSocketSession session,
org.springframework.web.socket.TextMessage message) |
handleBinaryMessage
@Autowired public WebSocketHandler(org.springframework.data.redis.core.RedisTemplate<String,Serializable> redisTemplate)
public void afterConnectionEstablished(org.springframework.web.socket.WebSocketSession session) throws Exception
afterConnectionEstablished
in interface org.springframework.web.socket.WebSocketHandler
afterConnectionEstablished
in class org.springframework.web.socket.handler.AbstractWebSocketHandler
Exception
protected void handleTextMessage(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.TextMessage message) throws Exception
handleTextMessage
in class org.springframework.web.socket.handler.AbstractWebSocketHandler
Exception
public void afterConnectionClosed(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.CloseStatus status)
afterConnectionClosed
in interface org.springframework.web.socket.WebSocketHandler
afterConnectionClosed
in class org.springframework.web.socket.handler.AbstractWebSocketHandler
Copyright © 2022. All rights reserved.