public class WebSocketSessionEventHandler extends Object
Modifier and Type | Field and Description |
---|---|
protected org.springframework.scheduling.TaskScheduler |
taskScheduler |
protected UserSessionService |
userSessionService |
Constructor and Description |
---|
WebSocketSessionEventHandler(UserSessionService userSessionService,
org.springframework.scheduling.TaskScheduler taskScheduler) |
Modifier and Type | Method and Description |
---|---|
protected String |
getUserId(Principal user) |
void |
onSessionConnectedEvent(org.springframework.web.socket.messaging.SessionConnectedEvent event) |
void |
onSessionDisconnectedEvent(org.springframework.web.socket.messaging.SessionDisconnectEvent event) |
protected final UserSessionService userSessionService
protected final org.springframework.scheduling.TaskScheduler taskScheduler
public WebSocketSessionEventHandler(UserSessionService userSessionService, org.springframework.scheduling.TaskScheduler taskScheduler)
@Order @EventListener public void onSessionConnectedEvent(org.springframework.web.socket.messaging.SessionConnectedEvent event)
@EventListener public void onSessionDisconnectedEvent(org.springframework.web.socket.messaging.SessionDisconnectEvent event)
Copyright © 2019. All rights reserved.