Class WebsocketConfig

  • All Implemented Interfaces:
    org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer

    @Configuration
    @EnableConfigurationProperties(BaseConfigProperties.class)
    @EnableWebSocketMessageBroker
    public class WebsocketConfig
    extends Object
    implements org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
    Awe Web Socket configuration.
    Author:
    mvelez
    • Constructor Detail

      • WebsocketConfig

        public WebsocketConfig​(BaseConfigProperties baseConfigProperties,
                               SecurityConfigProperties securityConfigProperties)
        Websocket config constructor
        Parameters:
        baseConfigProperties - Base configuration properties
        securityConfigProperties - Security configuration properties
    • Method Detail

      • configureMessageBroker

        public void configureMessageBroker​(org.springframework.messaging.simp.config.MessageBrokerRegistry config)
        Configures the message broker.
        Specified by:
        configureMessageBroker in interface org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
        Parameters:
        config - Message broker registry
      • registerStompEndpoints

        public void registerStompEndpoints​(org.springframework.web.socket.config.annotation.StompEndpointRegistry registry)
        Registers the end points.
        Specified by:
        registerStompEndpoints in interface org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
        Parameters:
        registry - Stomp end point registry
      • aweClientTracker

        @Bean
        @ConditionalOnMissingBean
        @SessionScope
        public AweClientTracker aweClientTracker()
        Awe Client Tracker
        Returns:
        Awe client tracker
      • aweConnectionTracker

        @Bean
        public AweConnectionTracker aweConnectionTracker()
        Retrieve connection tracker
        Returns:
        Connection tracker
      • broadcastService

        @Bean
        @ConditionalOnMissingBean
        public BroadcastService broadcastService​(org.springframework.messaging.simp.SimpMessagingTemplate brokerMessagingTemplate,
                                                 AweConnectionTracker connectionTracker)
        Broadcast service
        Parameters:
        brokerMessagingTemplate - Messaging template
        connectionTracker - Connection tracker
        Returns:
        Broadcasting service bean