142bde9c74f7a5e88ae24d290da3d38de945a7c5
[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.SessionUnsubscribeEvent;
7
8 public class SessionUnsubscribeListener implements ApplicationListener<SessionUnsubscribeEvent> {
9         private static final Logger LOGGER = LoggerFactory.getLogger(SessionUnsubscribeListener.class);
10
11         @Override
12         public void onApplicationEvent(SessionUnsubscribeEvent event) {
13                 LOGGER.info("SessionUnsubscribeEvent timestamp: " + event.getTimestamp());
14                 LOGGER.info("SessionUnsubscribeEvent user: " + event.getUser());
15                 LOGGER.info("SessionUnsubscribeEvent: " + event.toString());
16         }
17
18 }