类 WebSocketMessageBrokerConfiguration
java.lang.Object
org.springframework.session.web.socket.config.annotation.AbstractSessionWebSocketMessageBrokerConfigurer<org.springframework.session.Session>
cn.herodotus.engine.message.websocket.configuration.WebSocketMessageBrokerConfiguration
- 所有已实现的接口:
org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
@Configuration(proxyBeanMethods=false)
@EnableConfigurationProperties(WebSocketProperties.class)
@EnableScheduling
@EnableWebSocketMessageBroker
public class WebSocketMessageBrokerConfiguration
extends org.springframework.session.web.socket.config.annotation.AbstractSessionWebSocketMessageBrokerConfigurer<org.springframework.session.Session>
Description: WebSocketMessageBrokerConfigurer
- 作者:
- : gengwei.zheng
- Date:
- : 2022/12/4 19:19
-
构造器概要
构造器构造器说明WebSocketMessageBrokerConfiguration(WebSocketProperties webSocketProperties, WebSocketAuthenticationHandshakeInterceptor webSocketAuthenticationHandshakeInterceptor) -
方法概要
修饰符和类型方法说明voidconfigureClientInboundChannel(org.springframework.messaging.simp.config.ChannelRegistration registration) 采用自定义拦截器,获取connect时候传递的参数 设置输入消息通道的线程数,默认线程为1,可以自己自定义线程数,最大线程数,线程存活时间voidconfigureClientOutboundChannel(org.springframework.messaging.simp.config.ChannelRegistration registration) 设置输出消息通道的线程数,默认线程为1,可以自己自定义线程数,最大线程数,线程存活时间voidconfigureMessageBroker(org.springframework.messaging.simp.config.MessageBrokerRegistry registry) 配置消息代理protected voidconfigureStompEndpoints(org.springframework.web.socket.config.annotation.StompEndpointRegistry registry) 添加 Stomp Endpoint,创建配置客户端尝试连接地址,并对外暴露该接口,这样就可以通过websocket连接上服务voidconfigureWebSocketTransport(org.springframework.web.socket.config.annotation.WebSocketTransportRegistration registration) 配置发送与接收的消息参数,可以指定消息字节大小,缓存大小,发送超时时间void从类继承的方法 org.springframework.session.web.socket.config.annotation.AbstractSessionWebSocketMessageBrokerConfigurer
registerStompEndpoints, sessionRepositoryInterceptor, webSocketRegistryListener, wsConnectHandlerDecoratorFactory从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
addArgumentResolvers, addReturnValueHandlers, configureMessageConverters, getPhase
-
构造器详细资料
-
WebSocketMessageBrokerConfiguration
public WebSocketMessageBrokerConfiguration(WebSocketProperties webSocketProperties, WebSocketAuthenticationHandshakeInterceptor webSocketAuthenticationHandshakeInterceptor)
-
-
方法详细资料
-
postConstruct
@PostConstruct public void postConstruct() -
configureStompEndpoints
protected void configureStompEndpoints(org.springframework.web.socket.config.annotation.StompEndpointRegistry registry) 添加 Stomp Endpoint,创建配置客户端尝试连接地址,并对外暴露该接口,这样就可以通过websocket连接上服务- 指定者:
configureStompEndpoints在类中org.springframework.session.web.socket.config.annotation.AbstractSessionWebSocketMessageBrokerConfigurer<org.springframework.session.Session>- 参数:
registry-StompEndpointRegistry
-
configureMessageBroker
public void configureMessageBroker(org.springframework.messaging.simp.config.MessageBrokerRegistry registry) 配置消息代理- 参数:
registry-MessageBrokerRegistry
-
configureWebSocketTransport
public void configureWebSocketTransport(org.springframework.web.socket.config.annotation.WebSocketTransportRegistration registration) 配置发送与接收的消息参数,可以指定消息字节大小,缓存大小,发送超时时间- 指定者:
configureWebSocketTransport在接口中org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer- 覆盖:
configureWebSocketTransport在类中org.springframework.session.web.socket.config.annotation.AbstractSessionWebSocketMessageBrokerConfigurer<org.springframework.session.Session>- 参数:
registration-WebSocketTransportRegistration
-
configureClientInboundChannel
public void configureClientInboundChannel(org.springframework.messaging.simp.config.ChannelRegistration registration) 采用自定义拦截器,获取connect时候传递的参数 设置输入消息通道的线程数,默认线程为1,可以自己自定义线程数,最大线程数,线程存活时间- 指定者:
configureClientInboundChannel在接口中org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer- 覆盖:
configureClientInboundChannel在类中org.springframework.session.web.socket.config.annotation.AbstractSessionWebSocketMessageBrokerConfigurer<org.springframework.session.Session>- 参数:
registration-ChannelRegistration
-
configureClientOutboundChannel
public void configureClientOutboundChannel(org.springframework.messaging.simp.config.ChannelRegistration registration) 设置输出消息通道的线程数,默认线程为1,可以自己自定义线程数,最大线程数,线程存活时间- 参数:
registration-ChannelRegistration
-