da374e5086650c1e990c1b870d582bf9d3409b65
[JavaForFun] /
1 package de.spring.stomp.listeners;
2
3 import org.slf4j.Logger;
4 import org.slf4j.LoggerFactory;
5 import org.springframework.context.ApplicationListener;
6 import org.springframework.web.socket.messaging.SessionConnectEvent;
7
8 public class SessionConnectListener implements ApplicationListener<SessionConnectEvent> {
9         private static final Logger LOGGER = LoggerFactory.getLogger(SessionConnectListener.class);
10         
11         @Override
12         public void onApplicationEvent(SessionConnectEvent event) {
13                 LOGGER.info("SessionConnectEvent timestamp: " + event.getTimestamp());
14                 LOGGER.info("SessionConnectEvent user: " + event.getUser());
15                 LOGGER.info("SessionConnectEvent: " + event.toString());
16         }
17
18 }