クラス HttpRequestExecutingMessageHandler
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.http.outbound.AbstractHttpRequestExecutingMessageHandler
org.springframework.integration.http.outbound.HttpRequestExecutingMessageHandler
- 実装されたすべてのインターフェース:
org.reactivestreams.Subscriber<Message<?>>
、Aware
、BeanClassLoaderAware
、BeanFactoryAware
、BeanNameAware
、DisposableBean
、InitializingBean
、ApplicationContextAware
、Ordered
、ComponentSourceAware
、ExpressionCapable
、Orderable
、MessageProducer
、HeaderPropagationAware
、IntegrationPattern
、NamedComponent
、IntegrationManagement
、TrackableComponent
、MessageHandler
、reactor.core.CoreSubscriber<Message<?>>
RestTemplate
インスタンスに委譲して HTTP リクエストを実行する MessageHandler
実装。'expectReply' フラグが true (デフォルト) に設定されている場合、HTTP レスポンスからレスポンスメッセージが生成されます。そのレスポンスに本文が含まれている場合は、それがレスポンスメッセージのペイロードとして使用されます。それ以外の場合、レスポンスメッセージのペイロードには、HttpStatus
列挙のインスタンスとしてレスポンスステータスが含まれます。レスポンス本文がある場合は、代わりに HttpStatus
列挙インスタンスがレスポンスの MessageHeaders にコピーされます。どちらの場合も、レスポンスヘッダーは、このハンドラーの HeaderMapper
インスタンスによってレスポンスメッセージのヘッダーにマップされます。- 導入:
- 2.0
- 作成者:
- Mark Fisher, Oleg Zhurakousky, Gary Russell, Gunnar Hillert, Artem Bilan, Wallace Wadge, Shiliang Li
ネストされたクラスのサマリー
クラス org.springframework.integration.handler.AbstractReplyProducingMessageHandler から継承されたネストクラス / インターフェース
AbstractReplyProducingMessageHandler.RequestHandler
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたネストクラス / インターフェース
IntegrationManagement.ManagementOverrides
フィールドのサマリー
クラス org.springframework.integration.http.outbound.AbstractHttpRequestExecutingMessageHandler から継承されたフィールド
uriFactory
クラス 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
コンストラクターの概要
コンストラクターコンストラクター説明指定された URI にリクエストを送信するハンドラーを作成します。HttpRequestExecutingMessageHandler
(StringSE uri, RestTemplate restTemplate) 提供された RestTemplate を使用して、提供された URI にリクエストを送信するハンドラーを作成します。指定された URI にリクエストを送信するハンドラーを作成します。HttpRequestExecutingMessageHandler
(Expression uriExpression) 提供された URI 式にリクエストを送信するハンドラーを作成します。HttpRequestExecutingMessageHandler
(Expression uriExpression, RestTemplate restTemplate) 4 提供された RestTemplate を使用して、提供された URI にリクエストを送信するハンドラーを作成します。メソッドのサマリー
修飾子と型メソッド説明protected ObjectSE
exchange
(ObjectSE uri, HttpMethod httpMethod, HttpEntity<?> httpRequest, ObjectSE expectedResponseType, Message<?> requestMessage, MapSE<StringSE, ?> uriVariables) サブクラスはこのメソッドを実装して、コンポーネント型情報を提供できます。void
setEncodingMode
(DefaultUriBuilderFactory.EncodingMode encodingMode) 使用するエンコードモードを設定します。void
setErrorHandler
(ResponseErrorHandler errorHandler) 基になるRestTemplate
のResponseErrorHandler
を設定します。void
setMessageConverters
(ListSE<HttpMessageConverter<?>> messageConverters) 基礎となるRestTemplate
で使用されるHttpMessageConverter
のリストを設定します。void
setRequestFactory
(ClientHttpRequestFactory requestFactory) 基になるRestTemplate
のClientHttpRequestFactory
を設定します。クラス org.springframework.integration.http.outbound.AbstractHttpRequestExecutingMessageHandler から継承されたメソッド
doInit, evaluateTypeFromExpression, getIntegrationPatternType, getReply, handleRequestMessage, isExpectReply, mapHeaders, setCharset, setExpectedResponseType, setExpectedResponseTypeExpression, setExpectReply, setExtractPayload, setExtractResponseBody, setHeaderMapper, setHttpMethod, setHttpMethodExpression, setTransferCookies, setTrustedSpel, setUriVariableExpressions, setUriVariablesExpression
クラス org.springframework.integration.handler.AbstractReplyProducingMessageHandler から継承されたメソッド
doInvokeAdvisedRequestHandler, getBeanClassLoader, 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, 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, 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
インターフェース reactor.core.CoreSubscriber から継承されたメソッド
currentContext
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたメソッド
getThisAs
インターフェース org.springframework.integration.support.context.NamedComponent から継承されたメソッド
getBeanName, getComponentName
コンストラクターの詳細
HttpRequestExecutingMessageHandler
指定された URI にリクエストを送信するハンドラーを作成します。- パラメーター:
uri
- URI。
HttpRequestExecutingMessageHandler
指定された URI にリクエストを送信するハンドラーを作成します。- パラメーター:
uri
- URI。
HttpRequestExecutingMessageHandler
提供された URI 式にリクエストを送信するハンドラーを作成します。- パラメーター:
uriExpression
- URI 式。
HttpRequestExecutingMessageHandler
提供された RestTemplate を使用して、提供された URI にリクエストを送信するハンドラーを作成します。- パラメーター:
uri
- URI。restTemplate
- Rest テンプレート。
HttpRequestExecutingMessageHandler
public HttpRequestExecutingMessageHandler(Expression uriExpression, @Nullable RestTemplate restTemplate) 4 提供された RestTemplate を使用して、提供された URI にリクエストを送信するハンドラーを作成します。- パラメーター:
uriExpression
- メッセージオブジェクトおよびBeanFactory
に対して解決できる SpEL 式。restTemplate
- Rest テンプレート。
メソッドの詳細
getComponentType
クラスからコピーされた説明:IntegrationObjectSupport
サブクラスはこのメソッドを実装して、コンポーネント型情報を提供できます。- 次で指定:
- インターフェース
NamedComponent
のgetComponentType
- オーバーライド:
- クラス
MessageHandlerSupport
のgetComponentType
setErrorHandler
基になるRestTemplate
のResponseErrorHandler
を設定します。- パラメーター:
errorHandler
- エラーハンドラー。- 関連事項:
setMessageConverters
基礎となるRestTemplate
で使用されるHttpMessageConverter
のリストを設定します。この方法で構成されたコンバーターは、デフォルトのコンバーターをオーバーライドします。- パラメーター:
messageConverters
- メッセージコンバーター。- 関連事項:
setRequestFactory
基になるRestTemplate
のClientHttpRequestFactory
を設定します。- パラメーター:
requestFactory
- リクエストファクトリ。- 関連事項:
setEncodingMode
クラスからコピーされた説明:AbstractHttpRequestExecutingMessageHandler
使用するエンコードモードを設定します。デフォルトでは、これはDefaultUriBuilderFactory.EncodingMode.TEMPLATE_AND_VALUES
に設定されています。より複雑なシナリオでは、外部から提供されたRestTemplate
でUriTemplateHandler
を構成することを検討してください。- オーバーライド:
- クラス
AbstractHttpRequestExecutingMessageHandler
のsetEncodingMode
- パラメーター:
encodingMode
- uri エンコーディングに使用するモード
exchange
@Nullable protected ObjectSE exchange(ObjectSE uri, HttpMethod httpMethod, HttpEntity<?> httpRequest, @Nullable ObjectSE expectedResponseType, Message<?> requestMessage, @Nullable MapSE<StringSE, ?> uriVariables) - 次で指定:
- クラス
AbstractHttpRequestExecutingMessageHandler
のexchange