Class WebSocketConfiguration

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

    @Configuration
    @Profile("!test")
    @EnableWebSocketMessageBroker
    public class WebSocketConfiguration
    extends java.lang.Object
    implements org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
    Configuration for WebSockets, used for chat features in the application
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void configureClientInboundChannel​(org.springframework.messaging.simp.config.ChannelRegistration registration)
      Configures MessageChannel class so that authorised users are able to send messages
      void configureMessageBroker​(org.springframework.messaging.simp.config.MessageBrokerRegistry config)
      Method that configures MessageBroker to our chat endpoints Setting up broker is important for secure and reliable messaging.
      void registerStompEndpoints​(org.springframework.web.socket.config.annotation.StompEndpointRegistry registry)
      Integrates support for Stomp (Simple Text Orientated Messaging Protocol) One of the main components of Spring messaging framework
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer

        addArgumentResolvers, addReturnValueHandlers, configureClientOutboundChannel, configureMessageConverters, configureWebSocketTransport
    • Constructor Detail

      • WebSocketConfiguration

        public WebSocketConfiguration()
    • Method Detail

      • configureMessageBroker

        public void configureMessageBroker​(org.springframework.messaging.simp.config.MessageBrokerRegistry config)
        Method that configures MessageBroker to our chat endpoints Setting up broker is important for secure and reliable messaging.
        Specified by:
        configureMessageBroker in interface org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
        Parameters:
        config -
      • registerStompEndpoints

        public void registerStompEndpoints​(org.springframework.web.socket.config.annotation.StompEndpointRegistry registry)
        Integrates support for Stomp (Simple Text Orientated Messaging Protocol) One of the main components of Spring messaging framework
        Specified by:
        registerStompEndpoints in interface org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
        Parameters:
        registry -
      • configureClientInboundChannel

        public void configureClientInboundChannel​(org.springframework.messaging.simp.config.ChannelRegistration registration)
        Configures MessageChannel class so that authorised users are able to send messages
        Specified by:
        configureClientInboundChannel in interface org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
        Parameters:
        registration -