クラス RSocketInboundGateway
java.lang.ObjectSE
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.endpoint.AbstractEndpoint
org.springframework.integration.gateway.MessagingGatewaySupport
org.springframework.integration.rsocket.inbound.RSocketInboundGateway
- 実装済みのインターフェース一覧:
Aware, BeanFactoryAware, BeanNameAware, DisposableBean, InitializingBean, ApplicationContextAware, Lifecycle, Phased, SmartLifecycle, ComponentSourceAware, ExpressionCapable, IntegrationPattern, IntegrationRSocketEndpoint, NamedComponent, IntegrationInboundManagement, IntegrationManagement, ManageableLifecycle, ManageableSmartLifecycle, TrackableComponent, ReactiveMessageHandler
public class RSocketInboundGateway
extends MessagingGatewaySupport
implements IntegrationRSocketEndpoint
IntegrationRSocketEndpoint の MessagingGatewaySupport 実装。RSocket リクエストの受信エンドポイントを表します。 マッピング登録用に AbstractRSocketConnector で構成できます。または、既存の AbstractRSocketConnector Bean が自動的に検出を実行します。
受信 DataBuffer(単一または Publisher 要素として)は、setRequestElementClass(Class) または setRequestElementType(ResolvableType) で構成できるターゲットの予期される型に変換されます。構成されていない場合、ターゲット型は contentType ヘッダーによって決定されます。text の場合、ターゲット型は StringSE、それ以外の場合は - byte[] です。
受信 Publisher は、ペイロードを送信するためにメッセージでそのまま使用されます。そのペイロードを可能な方法で処理することは、ターゲットアプリケーションの責任です。
応答ペイロードは、ペイロードの型または Publisher 要素型に従って Flux にエンコードされます。
- 導入:
- 5.2
- 作成者:
- Artem Bilan
ネストされたクラスの概要
クラス MessagingGatewaySupport から継承されたネストクラス / インターフェース
MessagingGatewaySupport.ConvertingMessagingTemplateインターフェース IntegrationManagement から継承されたネストクラス / インターフェース
IntegrationManagement.ManagementOverridesフィールド概要
クラス MessagingGatewaySupport から継承されたフィールド
messagingTemplateクラス AbstractEndpoint から継承されたフィールド
lifecycleLockクラス IntegrationObjectSupport から継承されたフィールド
EXPRESSION_PARSER, loggerインターフェース IntegrationManagement から継承されたフィールド
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAMEインターフェース SmartLifecycle から継承されたフィールド
DEFAULT_PHASEコンストラクター概要
コンストラクターコンストラクター説明RSocketInboundGateway(StringSE... pathArg) 提供されたパスパターンに基づいてインスタンス化し、受信 RSocket リクエストに対してこのエンドポイントをマップします。方法の概要
修飾子と型メソッド説明protected voiddoStart()サブクラスは、開始動作でこのメソッドを実装する必要があります。このReactiveMessageHandlerがマップされるRSocketInteractionModelを取得します。StringSE[]getPath()このエンドポイントがマップされているパスパターンの配列を取得します。reactor.core.publisher.Mono<VoidSE> handleMessage(Message<?> requestMessage) protected voidonInit()サブクラスは、初期化ロジック用にこれを実装できます。voidsetDecodeFluxAsUnit(boolean decodeFluxAsUnit) 受信Fluxを単一ユニットまたは各イベントとして個別にデコードするオプションを構成します。voidsetInteractionModels(RSocketInteractionModel... interactionModelsArg) このエンドポイントがマップされるRSocketInteractionModelのセットを構成します。voidsetRequestElementClass(ClassSE<?> requestElementClass) 受信 RSocket リクエストコンテンツがエンコーダーによって読み取られるときに生成されるペイロードの型を指定します。voidsetRequestElementType(ResolvableType requestElementType) 受信 RSocket リクエストコンテンツがコンバーター / エンコーダーによって読み取られるときに生成されるペイロードの型を指定します。voidsetRSocketConnector(AbstractRSocketConnector rsocketConnector) 明示的なエンドポイントマッピング用のAbstractRSocketConnector参照を提供します。voidsetRSocketStrategies(RSocketStrategies rsocketStrategies) デフォルトのRSocketStrategiesの代わりにRSocketStrategiesを構成します。クラス MessagingGatewaySupport から継承されたメソッド
buildErrorMessage, buildSendTimer, destroy, doStop, getComponentType, getErrorChannel, getErrorMessageAttributes, getErrorMessageStrategy, getIntegrationPatternType, getManagedName, getManagedType, getOverrides, getReplyChannel, getRequestChannel, getRequestChannelName, isLoggingEnabled, isObserved, receive, receive, receiveMessage, receiveMessage, registerMetricsCaptor, registerObservationRegistry, registerReplyMessageCorrelatorIfNecessary, send, sendAndReceive, sendAndReceiveMessage, sendAndReceiveMessageReactive, sendTimer, setErrorChannel, setErrorChannelName, setErrorMessageStrategy, setErrorOnTimeout, setLoggingEnabled, setManagedName, setManagedType, setObservationConvention, setReceiverObservationConvention, setReplyChannel, setReplyChannelName, setReplyMapper, setReplyTimeout, setRequestChannel, setRequestChannelName, setRequestMapper, setRequestTimeout, setShouldTrackクラス AbstractEndpoint から継承されたメソッド
doStop, getPhase, getRole, isActive, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stopクラス 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クラス ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, wait, waitSE, waitSEインターフェース IntegrationManagement から継承されたメソッド
getThisAsインターフェース NamedComponent から継承されたメソッド
getBeanName, getComponentNameインターフェース SmartLifecycle から継承されたメソッド
isPauseable
コンストラクターの詳細
RSocketInboundGateway
提供されたパスパターンに基づいてインスタンス化し、受信 RSocket リクエストに対してこのエンドポイントをマップします。- パラメーター:
pathArg- 使用するマッピングパターン。
方法の詳細
setRSocketStrategies
デフォルトのRSocketStrategiesの代わりにRSocketStrategiesを構成します。注:AbstractRSocketConnectorが提供されている場合、そのRSocketStrategiesが優先されます。- パラメーター:
rsocketStrategies- 使用するRSocketStrategies。- 関連事項:
setRSocketConnector
明示的なエンドポイントマッピング用のAbstractRSocketConnector参照を提供します。- パラメーター:
rsocketConnector- 使用するAbstractRSocketConnector。
setInteractionModels
このエンドポイントがマップされるRSocketInteractionModelのセットを構成します。- パラメーター:
interactionModelsArg- マッピング用のRSocketInteractionModel。- 導入:
- 5.2.2
getInteractionModels
インターフェースからコピーされた説明:IntegrationRSocketEndpointこのReactiveMessageHandlerがマップされるRSocketInteractionModelを取得します。デフォルトはすべてのRSocketInteractionModelです。- 次で指定:
- インターフェース
IntegrationRSocketEndpoint内のgetInteractionModels - 戻り値:
- マッピングのための相互作用モデル。
getPath
このエンドポイントがマップされているパスパターンの配列を取得します。- 次で指定:
- インターフェース
IntegrationRSocketEndpoint内のgetPath - 戻り値:
- マッピングパス
setRequestElementClass
受信 RSocket リクエストコンテンツがエンコーダーによって読み取られるときに生成されるペイロードの型を指定します。デフォルトでは、この値は null です。これは、実行時に「テキスト」Content-Type が String になり、他のすべてのデフォルトがbyte[].classになることを意味します。- パラメーター:
requestElementClass- ペイロード型。
setRequestElementType
受信 RSocket リクエストのコンテンツがコンバーター / エンコーダーによって読み取られるときに生成されるペイロードの型を指定します。デフォルトでは、この値は null です。これは、実行時に「テキスト」Content-Type が String になるのに対し、他のすべての Content-Type はデフォルトでbyte[].classになることを意味します。- パラメーター:
requestElementType- ペイロード型。
setDecodeFluxAsUnit
public void setDecodeFluxAsUnit(boolean decodeFluxAsUnit) 受信Fluxを単一ユニットまたは各イベントとして個別にデコードするオプションを構成します。Spring メッセージング@MessageMappingとの整合性を保つために、デフォルトはfalseです。ターゲットFluxデコードロジックは、選択したDecoderによって異なります。たとえば、StringDecoderでは、バイトバッファの終了を示すために、ストリームに改行文字が存在する必要があります。- パラメーター:
decodeFluxAsUnit- 受信Fluxを単一ユニットまたは各イベントとして個別にデコードします。- 導入:
- 5.3
- 関連事項:
onInit
protected void onInit()クラスからコピーされた説明:IntegrationObjectSupportサブクラスは、初期化ロジック用にこれを実装できます。- オーバーライド:
- クラス
MessagingGatewaySupportのonInit
doStart
protected void doStart()クラスからコピーされた説明:AbstractEndpointサブクラスは、開始動作でこのメソッドを実装する必要があります。このメソッドは、AbstractEndpoint.lifecycleLockを保持しているときに呼び出されます。- オーバーライド:
- クラス
MessagingGatewaySupportのdoStart
handleMessage
- 次で指定:
- インターフェース
ReactiveMessageHandler内のhandleMessage