クラス WebSocketInboundChannelAdapter
java.lang.ObjectSE
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.endpoint.AbstractEndpoint
org.springframework.integration.endpoint.MessageProducerSupport
org.springframework.integration.websocket.inbound.WebSocketInboundChannelAdapter
- 実装されたすべてのインターフェース:
Aware
、BeanFactoryAware
、BeanNameAware
、DisposableBean
、InitializingBean
、SmartInitializingSingleton
、ApplicationContextAware
、ApplicationEventPublisherAware
、Lifecycle
、Phased
、SmartLifecycle
、ComponentSourceAware
、ExpressionCapable
、MessageProducer
、IntegrationPattern
、NamedComponent
、IntegrationInboundManagement
、IntegrationManagement
、ManageableLifecycle
、ManageableSmartLifecycle
、TrackableComponent
、WebSocketListener
、SubProtocolCapable
public class WebSocketInboundChannelAdapter
extends MessageProducerSupport
implements WebSocketListener, ApplicationEventPublisherAware
受信 WebSocket メッセージ用の
MessageProducerSupport
。- 導入:
- 4.1
- 作成者:
- Artem Bilan, Ngoc Nhan
ネストされたクラスのサマリー
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたネストクラス / インターフェース
IntegrationManagement.ManagementOverrides
フィールドのサマリー
クラス org.springframework.integration.endpoint.AbstractEndpoint から継承されたフィールド
lifecycleCondition, lifecycleLock
クラス org.springframework.integration.context.IntegrationObjectSupport から継承されたフィールド
EXPRESSION_PARSER, logger
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたフィールド
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
インターフェース org.springframework.context.SmartLifecycle から継承されたフィールド
DEFAULT_PHASE
コンストラクターの概要
コンストラクターコンストラクター説明WebSocketInboundChannelAdapter
(IntegrationWebSocketContainer webSocketContainer) WebSocketInboundChannelAdapter
(IntegrationWebSocketContainer webSocketContainer, SubProtocolHandlerRegistry protocolHandlerRegistry) メソッドのサマリー
修飾子と型メソッド説明void
afterSessionEnded
(WebSocketSession session, CloseStatus closeStatus) WebSocketSession
が終了した後に呼び出されます。void
afterSessionStarted
(WebSocketSession session) WebSocketSession
が開始した後に呼び出されます。protected void
doStart()
デフォルトでは何もしません。protected void
doStop()
デフォルトでは何もしません。サブクラスはこのメソッドを実装して、コンポーネント型情報を提供できます。boolean
isActive()
protected void
onInit()
サブクラスは、初期化ロジック用にこれを実装できます。void
onMessage
(WebSocketSession session, WebSocketMessage<?> webSocketMessage) 受け取ったWebSocketMessage
を処理します。void
setApplicationEventPublisher
(ApplicationEventPublisher applicationEventPublisher) void
setMergeWithDefaultConverters
(boolean mergeWithDefaultConverters) カスタムコンバーターの後にデフォルトコンバーターを使用できるかどうかを決定するフラグ。void
setMessageConverters
(ListSE<MessageConverter> messageConverters) 使用するメッセージコンバーターを設定します。void
setPayloadType
(ClassSE<?> payloadType) WebSocket メッセージ本文を変換するターゲットメッセージペイロードの型を設定します。void
setUseBroker
(boolean useBroker) このアダプターがnon-MESSAGE
WebSocketMessage
に対して既存の単一のAbstractBrokerMessageHandler
Bean を使用するかどうか、およびブローカー宛先を使用してメッセージをルーティングするかどうかを指定します。クラス org.springframework.integration.endpoint.MessageProducerSupport から継承されたメソッド
afterSingletonsInstantiated, buildErrorMessage, getErrorChannel, getErrorMessageAttributes, getErrorMessageStrategy, getIntegrationPatternType, getMessagingTemplate, getOutputChannel, isObserved, registerObservationRegistry, sendErrorMessageIfNecessary, sendMessage, setErrorChannel, setErrorChannelName, setErrorMessageStrategy, setObservationConvention, setOutputChannel, setOutputChannelName, setSendTimeout, setShouldTrack, subscribeToPublisher
クラス org.springframework.integration.endpoint.AbstractEndpoint から継承されたメソッド
destroy, doStop, getPhase, getRole, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stop
クラス org.springframework.integration.context.IntegrationObjectSupport から継承されたメソッド
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentDescription, getComponentName, getComponentSource, getConversionService, getExpression, getIntegrationProperties, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentDescription, setComponentName, setComponentSource, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
クラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, wait, waitSE, waitSE
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたメソッド
destroy, getManagedName, getManagedType, getOverrides, getThisAs, isLoggingEnabled, registerMetricsCaptor, setLoggingEnabled, setManagedName, setManagedType
インターフェース org.springframework.integration.support.context.NamedComponent から継承されたメソッド
getBeanName, getComponentName
コンストラクターの詳細
WebSocketInboundChannelAdapter
WebSocketInboundChannelAdapter
public WebSocketInboundChannelAdapter(IntegrationWebSocketContainer webSocketContainer, SubProtocolHandlerRegistry protocolHandlerRegistry)
メソッドの詳細
setMessageConverters
使用するメッセージコンバーターを設定します。これらのコンバーターは、適切な内部 subProtocols 型に送信するメッセージを変換するために使用されます。- パラメーター:
messageConverters
- メッセージコンバーター。
setMergeWithDefaultConverters
public void setMergeWithDefaultConverters(boolean mergeWithDefaultConverters) カスタムコンバーターの後にデフォルトコンバーターを使用できるかどうかを決定するフラグ。- パラメーター:
mergeWithDefaultConverters
- マージする場合は true、置き換える場合は false。
setPayloadType
WebSocket メッセージ本文を変換するターゲットメッセージペイロードの型を設定します。- パラメーター:
payloadType
- 受信 WebSocket メッセージ本文を変換する- 関連事項:
setUseBroker
public void setUseBroker(boolean useBroker) このアダプターがnon-MESSAGE
WebSocketMessage
に対して既存の単一のAbstractBrokerMessageHandler
Bean を使用するかどうか、およびブローカー宛先を使用してメッセージをルーティングするかどうかを指定します。現在のアプリケーションコンテキストでは単一のAbstractBrokerMessageHandler
Bean のみが許可されているため、Bean 参照を適用するのではなく、型によって前者をルックアップするアルゴリズム。これはサーバー側でのみ使用され、クライアント側では無視されます。- パラメーター:
useBroker
- ブールフラグ。
setApplicationEventPublisher
- 次で指定:
- インターフェース
ApplicationEventPublisherAware
のsetApplicationEventPublisher
onInit
protected void onInit()クラスからコピーされた説明:IntegrationObjectSupport
サブクラスは、初期化ロジック用にこれを実装できます。- オーバーライド:
- クラス
MessageProducerSupport
のonInit
getSubProtocols
- 次で指定:
- インターフェース
SubProtocolCapable
のgetSubProtocols
afterSessionStarted
インターフェースからコピーされた説明:WebSocketListener
WebSocketSession
が開始した後に呼び出されます。- 次で指定:
- インターフェース
WebSocketListener
のafterSessionStarted
- パラメーター:
session
- WebSocket セッション
afterSessionEnded
インターフェースからコピーされた説明:WebSocketListener
WebSocketSession
が終了した後に呼び出されます。- 次で指定:
- インターフェース
WebSocketListener
のafterSessionEnded
- パラメーター:
session
- WebSocket セッションcloseStatus
- セッションが閉じられた理由
onMessage
インターフェースからコピーされた説明:WebSocketListener
受け取ったWebSocketMessage
を処理します。- 次で指定:
- インターフェース
WebSocketListener
のonMessage
- パラメーター:
session
- WebSocket セッションwebSocketMessage
- WebSocket メッセージ
getComponentType
クラスからコピーされた説明:IntegrationObjectSupport
サブクラスはこのメソッドを実装して、コンポーネント型情報を提供できます。- 次で指定:
- インターフェース
NamedComponent
のgetComponentType
- オーバーライド:
- クラス
IntegrationObjectSupport
のgetComponentType
doStart
protected void doStart()クラスからコピーされた説明:MessageProducerSupport
デフォルトでは何も実行されません。ライフサイクル管理された動作が必要な場合、サブクラスはこれをオーバーライドできます。'lifecycleLock' によって保護されています。- オーバーライド:
- クラス
MessageProducerSupport
のdoStart
doStop
protected void doStop()クラスからコピーされた説明:MessageProducerSupport
デフォルトでは何もしません。サブクラスは、ライフサイクル管理の動作が必要な場合、これをオーバーライドできます。- オーバーライド:
- クラス
MessageProducerSupport
のdoStop
isActive
public boolean isActive()- オーバーライド:
- クラス
AbstractEndpoint
のisActive