Class WebSocketConfiguration
- java.lang.Object
-
- idatt2106.group3.backend.Configuration.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.WebSocketMessageBrokerConfigurerConfiguration for WebSockets, used for chat features in the application
-
-
Constructor Summary
Constructors Constructor Description WebSocketConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigureClientInboundChannel(org.springframework.messaging.simp.config.ChannelRegistration registration)Configures MessageChannel class so that authorised users are able to send messagesvoidconfigureMessageBroker(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.voidregisterStompEndpoints(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
-
-
-
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:
configureMessageBrokerin interfaceorg.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:
registerStompEndpointsin interfaceorg.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:
configureClientInboundChannelin interfaceorg.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer- Parameters:
registration-
-
-