如何从ApplicationListener或拦截器获取WebSocketSession

时间:2015-06-18 12:38:28

标签: java spring-websocket sockjs

是否可以从SessionSubscribeEvent获取会话(WebSocketSession)?

public class SubscriberListener implements ApplicationListener<SessionSubscribeEvent> {

   @Override
   public void onApplicationEvent(SessionSubscribeEvent event) {
       // how to get WebSocketSession?
   }
}

我的WebSocketConfig从AbstractWebSocketMessageBrokerConfigurer扩展

0 个答案:

没有答案