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.WebSocketMessageBrokerConfigurer
Configuration 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 void
configureClientInboundChannel(org.springframework.messaging.simp.config.ChannelRegistration registration)
Configures MessageChannel class so that authorised users are able to send messagesvoid
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
-
-
-
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 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:
registerStompEndpoints
in 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:
configureClientInboundChannel
in interfaceorg.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
- Parameters:
registration
-
-
-