1 package de.spring.stomp.listeners;
3 import org.slf4j.Logger;
4 import org.slf4j.LoggerFactory;
5 import org.springframework.context.ApplicationListener;
6 import org.springframework.web.socket.messaging.SessionConnectedEvent;
8 public class SessionConnectedListener implements ApplicationListener<SessionConnectedEvent> {
9 private static final Logger LOGGER = LoggerFactory.getLogger(SessionConnectedListener.class);
12 public void onApplicationEvent(SessionConnectedEvent event) {
13 LOGGER.info("SessionConnectedEvent timestamp: " + event.getTimestamp());
14 LOGGER.info("SessionConnectedEvent user: " + event.getUser());
15 LOGGER.info("SessionConnectedEvent: " + event.toString());