クラス AbstractSessionWebSocketMessageBrokerConfigurer<S extends Session>
java.lang.ObjectSE
org.springframework.session.web.socket.config.annotation.AbstractSessionWebSocketMessageBrokerConfigurer<S>
- 型パラメーター:
S
- セッションの型
- 実装されたすべてのインターフェース:
org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
public abstract class AbstractSessionWebSocketMessageBrokerConfigurer<S extends Session>
extends ObjectSE
implements org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
Web ソケットと Spring Session の統合の構成を容易にします。
構成:
使用例
@Configuration @EnableScheduling @EnableWebSocketMessageBroker public class WebSocketConfig<S extends Session> extends AbstractSessionWebSocketMessageBrokerConfigurer<S> { @Override protected void configureStompEndpoints(StompEndpointRegistry registry) { registry.addEndpoint("/messages") .withSockJS(); } @Override public void configureMessageBroker(MessageBrokerRegistry registry) { registry.enableSimpleBroker("/queue/", "/topic/"); registry.setApplicationDestinationPrefixes("/app"); } }
- 導入:
- 1.0
コンストラクターのサマリー
コンストラクターメソッドのサマリー
修飾子と型メソッド説明void
configureClientInboundChannel
(org.springframework.messaging.simp.config.ChannelRegistration registration) protected abstract void
configureStompEndpoints
(org.springframework.web.socket.config.annotation.StompEndpointRegistry registry) それぞれを特定の URL にマッピングする STOMP エンドポイントを登録し、(オプションで) インターセプターとして自動的に追加されたSessionRepositoryMessageInterceptor
を使用して SockJS フォールバックオプションを有効にして構成します。void
configureWebSocketTransport
(org.springframework.web.socket.config.annotation.WebSocketTransportRegistration registration) final void
registerStompEndpoints
(org.springframework.web.socket.config.annotation.StompEndpointRegistry registry) クラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSE
インターフェース org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer から継承されたメソッド
addArgumentResolvers, addReturnValueHandlers, configureClientOutboundChannel, configureMessageBroker, configureMessageConverters, getPhase
コンストラクターの詳細
AbstractSessionWebSocketMessageBrokerConfigurer
public AbstractSessionWebSocketMessageBrokerConfigurer()
メソッドの詳細
configureClientInboundChannel
public void configureClientInboundChannel(org.springframework.messaging.simp.config.ChannelRegistration registration) - 次で指定:
- インターフェース
org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
のconfigureClientInboundChannel
registerStompEndpoints
public final void registerStompEndpoints(org.springframework.web.socket.config.annotation.StompEndpointRegistry registry) - 次で指定:
- インターフェース
org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
のregisterStompEndpoints
configureStompEndpoints
protected abstract void configureStompEndpoints(org.springframework.web.socket.config.annotation.StompEndpointRegistry registry) それぞれを特定の URL にマッピングする STOMP エンドポイントを登録し、(オプションで) インターセプターとして自動的に追加されたSessionRepositoryMessageInterceptor
を使用して SockJS フォールバックオプションを有効にして構成します。- パラメーター:
registry
-SessionRepositoryMessageInterceptor
が自動的に追加されたStompEndpointRegistry
。
configureWebSocketTransport
public void configureWebSocketTransport(org.springframework.web.socket.config.annotation.WebSocketTransportRegistration registration) - 次で指定:
- インターフェース
org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
のconfigureWebSocketTransport
webSocketRegistryListener
wsConnectHandlerDecoratorFactory
sessionRepositoryInterceptor