クラス RSocketOutboundGateway
java.lang.ObjectSE
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.handler.MessageHandlerSupport
org.springframework.integration.handler.AbstractMessageHandler
org.springframework.integration.handler.AbstractMessageProducingHandler
org.springframework.integration.handler.AbstractReplyProducingMessageHandler
org.springframework.integration.rsocket.outbound.RSocketOutboundGateway
- 実装されたすべてのインターフェース:
org.reactivestreams.Subscriber<Message<?>>
、Aware
、BeanClassLoaderAware
、BeanFactoryAware
、BeanNameAware
、DisposableBean
、InitializingBean
、ApplicationContextAware
、Ordered
、ExpressionCapable
、Orderable
、MessageProducer
、HeaderPropagationAware
、IntegrationPattern
、NamedComponent
、IntegrationManagement
、TrackableComponent
、MessageHandler
、reactor.core.CoreSubscriber<Message<?>>
RSocket リクエストの送信メッセージングゲートウェイ。リクエストロジックは完全に
RSocketRequester
に基づいており、クライアント側の ClientRSocketConnector
またはサーバー側の RSocketRequesterMethodArgumentResolver.RSOCKET_REQUESTER_HEADER
リクエストメッセージヘッダーから取得できます。RSocket 操作は、構成された RSocketInteractionModel
またはそれぞれの SpEL 式によって決定され、実行時にリクエストメッセージに対して評価されます。デフォルトでは、RSocketInteractionModel.requestResponse
操作が使用されます。
Publisher
ベースのリクエストの場合、リクエストメッセージ payload
に存在する必要があります。アップストリーム FluxMessageChannel
を介したフラット化も機能しますが、この方法では特定のリクエストの範囲が失われ、すべての Publisher
イベントが独自のプレーンリクエストで送信されます。
応答が Flux
の場合、リクエストスコープを保持するために Mono
にラップされます。ダウンストリームフローは、メッセージペイロードからこの Flux
を取得し、それ自体でサブスクライブする責任があります。このコンポーネントからの Mono
応答は、ダウンストリーム FluxMessageChannel
からサブスクライブされるか、それ以外の場合は ListenableFuture
に適合されます。
- 導入:
- 5.2
- 作成者:
- Artem Bilan
- 関連事項:
ネストされたクラスのサマリー
クラス org.springframework.integration.handler.AbstractReplyProducingMessageHandler から継承されたネストクラス / インターフェース
AbstractReplyProducingMessageHandler.RequestHandler
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたネストクラス / インターフェース
IntegrationManagement.ManagementOverrides
フィールドサマリー
クラス org.springframework.integration.handler.AbstractMessageProducingHandler から継承されたフィールド
messagingTemplate
クラス org.springframework.integration.context.IntegrationObjectSupport から継承されたフィールド
EXPRESSION_PARSER, logger
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたフィールド
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
インターフェース org.springframework.core.Ordered から継承されたフィールド
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
コンストラクターのサマリー
コンストラクターコンストラクター説明RSocketOutboundGateway
(StringSE route, ObjectSE... routeVariables) 提供された RSocket エンドポイントroute
とオプションの変数に基づいてインスタンス化し、ルートテンプレートを展開します。RSocketOutboundGateway
(Expression routeExpression) 提供された SpEL 式に基づいてインスタンス化し、実行時に RSocket エンドポイントroute
をリクエストメッセージに対して評価します。メソッドのサマリー
修飾子と型メソッド説明protected void
doInit()
protected ObjectSE
handleRequestMessage
(Message<?> requestMessage) サブクラスはこのメソッドを実装して、リクエストメッセージを処理する必要があります。void
setClientRSocketConnector
(ClientRSocketConnector clientRSocketConnector) ClientRSocketConnector.getRequester()
によって提供される接続に基づいて、クライアント側のリクエストに対してClientRSocketConnector
を構成します。void
setExpectedResponseType
(ClassSE<?> expectedResponseType) RSocket レスポンスのレスポンス型を指定します。void
setExpectedResponseTypeExpression
(Expression expectedResponseTypeExpression) Expression
を指定して、RSocket レスポンスの型を判別します。void
setInteractionModel
(RSocketInteractionModel interactionModel) RSocket リクエスト型のRSocketInteractionModel
を構成します。void
setInteractionModelExpression
(Expression interactionModelExpression) リクエストメッセージに対して実行時に RSocket リクエスト型のRSocketInteractionModel
を評価するように SpEL 式を構成します。void
setMetadataExpression
(Expression metadataExpression) SpEL 式を指定して、RSocket リクエストのメタデータをリクエストメッセージに対してMap<Object, MimeType>
として評価します。void
setPublisherElementType
(ClassSE<?> publisherElementType) リクエストPublisher
要素の型を構成します。void
setPublisherElementTypeExpression
(Expression publisherElementTypeExpression) 実行時にリクエストメッセージに対してリクエストPublisher
要素型を評価するように SpEL 式を構成します。クラス org.springframework.integration.handler.AbstractReplyProducingMessageHandler から継承されたメソッド
doInvokeAdvisedRequestHandler, getBeanClassLoader, getIntegrationPatternType, getRequiresReply, handleMessageInternal, hasAdviceChain, onInit, setAdviceChain, setBeanClassLoader, setRequiresReply
クラス org.springframework.integration.handler.AbstractMessageProducingHandler から継承されたメソッド
addNotPropagatedHeaders, createOutputMessage, getNotPropagatedHeaders, getOutputChannel, isAsync, messageBuilderForReply, produceOutput, resolveErrorChannel, sendErrorMessage, sendOutput, sendOutputs, setAsync, setNotPropagatedHeaders, setOutputChannel, setOutputChannelName, setSendTimeout, setupMessageProcessor, shouldCopyRequestHeaders, shouldSplitOutput, updateNotPropagatedHeaders
クラス org.springframework.integration.handler.AbstractMessageHandler から継承されたメソッド
handleMessage, onComplete, onError, onNext, onSubscribe, setObservationConvention
クラス org.springframework.integration.handler.MessageHandlerSupport から継承されたメソッド
buildSendTimer, destroy, getComponentType, getManagedName, getManagedType, getMetricsCaptor, getObservationRegistry, getOrder, getOverrides, isLoggingEnabled, isObserved, registerMetricsCaptor, registerObservationRegistry, sendTimer, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, shouldTrack
クラス org.springframework.integration.context.IntegrationObjectSupport から継承されたメソッド
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
クラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, wait, waitSE, waitSE
インターフェース reactor.core.CoreSubscriber から継承されたメソッド
currentContext
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたメソッド
getThisAs
インターフェース org.springframework.integration.support.context.NamedComponent から継承されたメソッド
getBeanName, getComponentName
コンストラクターの詳細
RSocketOutboundGateway
提供された RSocket エンドポイントroute
とオプションの変数に基づいてインスタンス化し、ルートテンプレートを展開します。- パラメーター:
route
- 使用する RSocket エンドポイントルート。routeVariables
- ルートテンプレートを展開する変数。
RSocketOutboundGateway
提供された SpEL 式に基づいてインスタンス化し、実行時に RSocket エンドポイントroute
をリクエストメッセージに対して評価します。ルートがテンプレートであり、変数の展開が必要な場合は、この式の評価でそれを行うことをお勧めします。たとえば、適切なロジックを備えた Bean を使用します。- パラメーター:
routeExpression
- 使用する SpEL 式。
メソッドの詳細
setClientRSocketConnector
ClientRSocketConnector.getRequester()
によって提供される接続に基づいて、クライアント側のリクエストに対してClientRSocketConnector
を構成します。サーバー側の場合、リクエストメッセージのRSocketRequesterMethodArgumentResolver.RSOCKET_REQUESTER_HEADER
ヘッダーにRSocketRequester
を指定する必要があります。- パラメーター:
clientRSocketConnector
- 使用するClientRSocketConnector
。
setInteractionModel
RSocket リクエスト型のRSocketInteractionModel
を構成します。- パラメーター:
interactionModel
- 使用するRSocketInteractionModel
。- 導入:
- 5.2.2
setInteractionModelExpression
リクエストメッセージに対して実行時に RSocket リクエスト型のRSocketInteractionModel
を評価するように SpEL 式を構成します。- パラメーター:
interactionModelExpression
- 使用する SpEL 式。- 導入:
- 5.2.2
setPublisherElementType
リクエストPublisher
要素の型を構成します。- パラメーター:
publisherElementType
- リクエストPublisher
要素の型。- 関連事項:
setPublisherElementTypeExpression
実行時にリクエストメッセージに対してリクエストPublisher
要素型を評価するように SpEL 式を構成します。- パラメーター:
publisherElementTypeExpression
- リクエストPublisher
要素の型を評価する式。- 関連事項:
setExpectedResponseType
RSocket レスポンスのレスポンス型を指定します。- パラメーター:
expectedResponseType
- 期待される型。- 関連事項:
setExpectedResponseTypeExpression
Expression
を指定して、RSocket レスポンスの型を判別します。- パラメーター:
expectedResponseTypeExpression
- 予期されるレスポンス型の式。- 関連事項:
setMetadataExpression
SpEL 式を指定して、RSocket リクエストのメタデータをリクエストメッセージに対してMap<Object, MimeType>
として評価します。- パラメーター:
metadataExpression
- メタデータの式。
doInit
protected void doInit()- オーバーライド:
- クラス
AbstractReplyProducingMessageHandler
のdoInit
handleRequestMessage
クラスからコピーされた説明:AbstractReplyProducingMessageHandler
サブクラスはこのメソッドを実装して、リクエストメッセージを処理する必要があります。戻り値は、メッセージ、MessageBuilder、任意のプレーンオブジェクトです。基本クラスは、これらの開始点のいずれかからの返信メッセージの最終的な作成を処理します。戻り値が null の場合、メッセージフローはここで終了します。- 次で指定:
- クラス
AbstractReplyProducingMessageHandler
のhandleRequestMessage
- パラメーター:
requestMessage
- リクエストメッセージ。- 戻り値:
- メッセージを処理した結果、または
null