Package com.bytedesk.core.socket.stomp
Class StompConfig
java.lang.Object
com.bytedesk.core.socket.stomp.StompConfig
- All Implemented Interfaces:
org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
@Configuration
@EnableWebSocketMessageBroker
public class StompConfig
extends Object
implements org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
https://docs.spring.io/spring-framework/reference/web/websocket/stomp/enable.html
- Author:
- bytedesk.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
configureMessageBroker
(org.springframework.messaging.simp.config.MessageBrokerRegistry messageBrokerRegistry) SpringBoot官方说明 Using WebSocket to build an interactive web application: https://spring.io/guides/gs/messaging-stomp-websocket/ https://www.sitepoint.com/implementing-spring-websocket-server-and-client/void
configureWebSocketTransport
(org.springframework.web.socket.config.annotation.WebSocketTransportRegistration registration) 用于优化 clientOutboundChannel 性能org.springframework.web.socket.server.support.DefaultHandshakeHandler
void
registerStompEndpoints
(org.springframework.web.socket.config.annotation.StompEndpointRegistry stompEndpointRegistry) /stomp is the HTTP URL for the endpoint to which a WebSocket (or SockJS) client needs to connect for the WebSocket handshake.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, configureClientInboundChannel, configureClientOutboundChannel, configureMessageConverters, getPhase
-
Constructor Details
-
StompConfig
public StompConfig()
-
-
Method Details
-
registerStompEndpoints
public void registerStompEndpoints(org.springframework.web.socket.config.annotation.StompEndpointRegistry stompEndpointRegistry) /stomp is the HTTP URL for the endpoint to which a WebSocket (or SockJS) client needs to connect for the WebSocket handshake.- Specified by:
registerStompEndpoints
in interfaceorg.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
- Parameters:
stompEndpointRegistry
- registry
-
handshakeHandler
@Bean public org.springframework.web.socket.server.support.DefaultHandshakeHandler handshakeHandler() -
configureMessageBroker
public void configureMessageBroker(org.springframework.messaging.simp.config.MessageBrokerRegistry messageBrokerRegistry) SpringBoot官方说明 Using WebSocket to build an interactive web application: https://spring.io/guides/gs/messaging-stomp-websocket/ https://www.sitepoint.com/implementing-spring-websocket-server-and-client/- Specified by:
configureMessageBroker
in interfaceorg.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
- Parameters:
messageBrokerRegistry
- config
-
configureWebSocketTransport
public void configureWebSocketTransport(org.springframework.web.socket.config.annotation.WebSocketTransportRegistration registration) 用于优化 clientOutboundChannel 性能- Specified by:
configureWebSocketTransport
in interfaceorg.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
- Parameters:
registration
- registration
-
customWebSocketHandlerDecoratorFactory
-