Class StompSubscriptionEventListener

java.lang.Object
net.brabenetz.app.springstompserver.config.StompSubscriptionEventListener
All Implemented Interfaces:
EventListener, org.springframework.context.ApplicationListener<org.springframework.web.socket.messaging.SessionSubscribeEvent>

@Component public class StompSubscriptionEventListener extends Object implements org.springframework.context.ApplicationListener<org.springframework.web.socket.messaging.SessionSubscribeEvent>
Listen on all subscriptions, and if a subscription starts with WebSocketInitLoadConfigProperties.getDestinationPatterns(), then directly send an initial load from WebSocketInitLoadConfigProperties.getProxyUrl() to the subscribed topic.
  • Constructor Details

    • StompSubscriptionEventListener

      public StompSubscriptionEventListener()
  • Method Details

    • onApplicationEvent

      public void onApplicationEvent(org.springframework.web.socket.messaging.SessionSubscribeEvent event)
      Specified by:
      onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.web.socket.messaging.SessionSubscribeEvent>