Package com.almis.awe.autoconfigure
Class WebsocketConfig
java.lang.Object
org.springframework.session.web.socket.config.annotation.AbstractSessionWebSocketMessageBrokerConfigurer<org.springframework.session.Session>
com.almis.awe.autoconfigure.WebsocketConfig
- All Implemented Interfaces:
org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
@Configuration
@EnableConfigurationProperties(BaseConfigProperties.class)
@EnableWebSocketMessageBroker
public class WebsocketConfig
extends org.springframework.session.web.socket.config.annotation.AbstractSessionWebSocketMessageBrokerConfigurer<org.springframework.session.Session>
Awe Web Socket configuration.
- Author:
- mvelez
-
Constructor Summary
ConstructorDescriptionWebsocketConfig
(BaseConfigProperties baseConfigProperties, SecurityConfigProperties securityConfigProperties) Websocket config constructor -
Method Summary
Modifier and TypeMethodDescriptionAwe Client TrackerRetrieve connection trackerbroadcastService
(org.springframework.messaging.simp.SimpMessagingTemplate brokerMessagingTemplate, AweConnectionTracker connectionTracker) Broadcast servicevoid
configureMessageBroker
(org.springframework.messaging.simp.config.MessageBrokerRegistry config) Configures the message broker.void
configureStompEndpoints
(org.springframework.web.socket.config.annotation.StompEndpointRegistry registry) Registers the end points.webSocketEvent
(InitService initService, AweConnectionTracker connectionTracker) Websocket eventsMethods inherited from class org.springframework.session.web.socket.config.annotation.AbstractSessionWebSocketMessageBrokerConfigurer
configureClientInboundChannel, configureWebSocketTransport, registerStompEndpoints, sessionRepositoryInterceptor, webSocketRegistryListener, wsConnectHandlerDecoratorFactory
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, getPhase
-
Constructor Details
-
WebsocketConfig
public WebsocketConfig(BaseConfigProperties baseConfigProperties, SecurityConfigProperties securityConfigProperties) Websocket config constructor- Parameters:
baseConfigProperties
- Base configuration propertiessecurityConfigProperties
- Security configuration properties
-
-
Method Details
-
configureMessageBroker
public void configureMessageBroker(org.springframework.messaging.simp.config.MessageBrokerRegistry config) Configures the message broker.- Parameters:
config
- Message broker registry
-
configureStompEndpoints
public void configureStompEndpoints(org.springframework.web.socket.config.annotation.StompEndpointRegistry registry) Registers the end points.- Specified by:
configureStompEndpoints
in classorg.springframework.session.web.socket.config.annotation.AbstractSessionWebSocketMessageBrokerConfigurer<org.springframework.session.Session>
- Parameters:
registry
- Stomp end point registry
-
aweClientTracker
Awe Client Tracker- Returns:
- Awe client tracker
-
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 templateconnectionTracker
- Connection tracker- Returns:
- Broadcasting service bean
-
webSocketEvent
@Bean @ConditionalOnMissingBean public WebSocketEventListener webSocketEvent(InitService initService, AweConnectionTracker connectionTracker) Websocket events- Returns:
- Websocket connected event bean
-