クラスの使用
org.springframework.web.socket.config.annotation.SockJsServiceRegistration
org.springframework.web.socket.config.annotation 内の SockJsServiceRegistration 使用
修飾子と型メソッド説明protected SockJsServiceRegistration
AbstractWebSocketHandlerRegistration.getSockJsServiceRegistration()
SockJS が有効な場合はSockJsServiceRegistration
を公開し、そうでない場合はnull
を公開することで、アプリケーションが TaskScheduler を提供していない場合に、設定できるようにします。protected SockJsServiceRegistration
SockJsServiceRegistration.setAllowedOriginPatterns
(StringSE... allowedOriginPatterns) 許可されるOrigin
パターンヘッダー値を構成します。protected SockJsServiceRegistration
SockJsServiceRegistration.setAllowedOrigins
(StringSE... allowedOrigins) 許可されたOrigin
ヘッダー値を構成します。SockJsServiceRegistration.setClientLibraryUrl
(StringSE clientLibraryUrl) ネイティブのクロスドメイン通信のないトランスポート(例:SockJsServiceRegistration.setDisconnectDelay
(long disconnectDelay) 受信接続がない後、クライアントが切断されたと見なされるまでの時間(ミリ秒単位)。SockJsServiceRegistration.setHeartbeatTime
(long heartbeatTime) サーバーがメッセージを送信せず、接続が切断されないようにするためにサーバーがクライアントにハートビートフレームを送信するまでのミリ秒単位の時間。SockJsServiceRegistration.setHttpMessageCacheSize
(int httpMessageCacheSize) クライアントからの次の HTTP ポーリングリクエストを待つ間にセッションがキャッシュできるサーバーからクライアントへのメッセージの数。SockJsServiceRegistration.setInterceptors
(HandshakeInterceptor... interceptors) SockJsServiceRegistration.setMessageCodec
(SockJsMessageCodec codec) SockJS メッセージのエンコードとデコードに使用するコーデック。SockJsServiceRegistration.setSessionCookieNeeded
(boolean sessionCookieNeeded) SockJS プロトコルでは、サーバーがクライアントからの最初の "/info" リクエストに、アプリケーションが正しく機能するために JSESSIONIDCookie の使用が必要かどうかを示す "cookie_needed" ブールプロパティで応答する必要があります。SockJsServiceRegistration.setStreamBytesLimit
(int streamBytesLimit) ストリーミングトランスポートはクライアント側のレスポンスを保存し、配信されたメッセージが使用していたメモリを解放しません。SockJsServiceRegistration.setSuppressCors
(boolean suppressCors) このオプションを使用して、SockJS リクエストの CORS ヘッダーの自動追加を無効にすることができます。SockJsServiceRegistration.setTaskScheduler
(TaskScheduler scheduler) SockJS ハートビートのスケジュールに使用するスケジューラインスタンス。SockJsServiceRegistration.setTransportHandlerOverrides
(TransportHandler... handlers) SockJsServiceRegistration.setTransportHandlers
(TransportHandler... handlers) SockJsServiceRegistration.setWebSocketEnabled
(boolean webSocketEnabled) 一部のロードバランサーは WebSocket をサポートしていません。AbstractWebSocketHandlerRegistration.withSockJS()
StompWebSocketEndpointRegistration.withSockJS()
SockJS フォールバックオプションを有効にします。WebMvcStompWebSocketEndpointRegistration.withSockJS()
WebSocketHandlerRegistration.withSockJS()
SockJS フォールバックオプションを有効にします。