クラス 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 または RestClient インスタンスに処理を委譲して 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, Arun Sethumadhavan
ネストされたクラスの概要
クラス AbstractReplyProducingMessageHandler から継承されたネストクラス / インターフェース
AbstractReplyProducingMessageHandler.RequestHandlerインターフェース IntegrationManagement から継承されたネストクラス / インターフェース
IntegrationManagement.ManagementOverridesフィールド概要
クラス AbstractHttpRequestExecutingMessageHandler から継承されたフィールド
uriFactoryクラス AbstractMessageProducingHandler から継承されたフィールド
messagingTemplateクラス IntegrationObjectSupport から継承されたフィールド
EXPRESSION_PARSER, loggerインターフェース IntegrationManagement から継承されたフィールド
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAMEインターフェース Ordered から継承されたフィールド
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCEコンストラクター概要
コンストラクターコンストラクター説明指定された URI にリクエストを送信するハンドラーを作成します。HttpRequestExecutingMessageHandler(StringSE uri, @Nullable RestClient restClient) 提供された RestClient を使用して、提供された URI にリクエストを送信するハンドラーを作成します。HttpRequestExecutingMessageHandler(StringSE uri, @Nullable RestTemplate restTemplate) 非推奨、削除予定: この API 要素は、将来のバージョンで削除される可能性があります。指定された URI にリクエストを送信するハンドラーを作成します。HttpRequestExecutingMessageHandler(Expression uriExpression) 提供された URI 式にリクエストを送信するハンドラーを作成します。HttpRequestExecutingMessageHandler(Expression uriExpression, @Nullable RestClient restClient) 提供された RestClient を使用して、提供された URI にリクエストを送信するハンドラーを作成します。HttpRequestExecutingMessageHandler(Expression uriExpression, @Nullable RestTemplate restTemplate) 非推奨、削除予定: この API 要素は、将来のバージョンで削除される可能性があります。7.1 はRestClientベースの構成を推奨しています。方法の概要
修飾子と型メソッド説明protected voiddoInit()protected @Nullable ObjectSEexchange(ObjectSE uri, HttpMethod httpMethod, HttpEntity<?> httpRequest, ObjectSE expectedResponseType, Message<?> requestMessage, MapSE<StringSE, ?> uriVariables) voidsetEncodingMode(DefaultUriBuilderFactory.EncodingMode encodingMode) 使用するエンコードモードを設定します。voidsetErrorHandler(ResponseErrorHandler errorHandler) 基になるRestTemplateのResponseErrorHandlerを設定します。voidsetMessageConverters(ListSE<HttpMessageConverter<?>> messageConverters) 基礎となるRestTemplateで使用されるHttpMessageConverterのリストを設定します。voidsetRequestFactory(ClientHttpRequestFactory requestFactory) 基になるRestTemplateのClientHttpRequestFactoryを設定します。クラス AbstractHttpRequestExecutingMessageHandler から継承されたメソッド
evaluateTypeFromExpression, getIntegrationPatternType, getReply, handleRequestMessage, isExpectReply, mapHeaders, setCharset, setExpectedResponseType, setExpectedResponseTypeExpression, setExpectReply, setExtractPayload, setExtractResponseBody, setHeaderMapper, setHttpMethod, setHttpMethodExpression, setTransferCookies, setTrustedSpel, setUriVariableExpressions, setUriVariablesExpressionクラス AbstractReplyProducingMessageHandler から継承されたメソッド
doInvokeAdvisedRequestHandler, getBeanClassLoader, getRequiresReply, handleMessageInternal, hasAdviceChain, onInit, setAdviceChain, setBeanClassLoader, setRequiresReplyクラス AbstractMessageProducingHandler から継承されたメソッド
addNotPropagatedHeaders, createOutputMessage, getNotPropagatedHeaders, getOutputChannel, isAsync, messageBuilderForReply, produceOutput, resolveErrorChannel, sendErrorMessage, sendOutput, sendOutputs, setAsync, setNotPropagatedHeaders, setOutputChannel, setOutputChannelName, setSendTimeout, setupMessageProcessor, shouldCopyRequestHeaders, shouldSplitOutput, updateNotPropagatedHeadersクラス AbstractMessageHandler から継承されたメソッド
handleMessage, onComplete, onError, onNext, onSubscribe, setObservationConventionクラス MessageHandlerSupport から継承されたメソッド
buildSendTimer, destroy, getManagedName, getManagedType, getMetricsCaptor, getObservationRegistry, getOrder, getOverrides, isLoggingEnabled, isObserved, registerMetricsCaptor, registerObservationRegistry, sendTimer, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, shouldTrackクラス 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インターフェース reactor.core.CoreSubscriber から継承されたメソッド
currentContextインターフェース IntegrationManagement から継承されたメソッド
getThisAsインターフェース NamedComponent から継承されたメソッド
getBeanName, getComponentName
コンストラクターの詳細
HttpRequestExecutingMessageHandler
指定された URI にリクエストを送信するハンドラーを作成します。- パラメーター:
uri- URI。
HttpRequestExecutingMessageHandler
指定された URI にリクエストを送信するハンドラーを作成します。- パラメーター:
uri- URI。
HttpRequestExecutingMessageHandler
提供された URI 式にリクエストを送信するハンドラーを作成します。- パラメーター:
uriExpression- URI 式。
HttpRequestExecutingMessageHandler
@DeprecatedSE(since="7.1", forRemoval=true) public HttpRequestExecutingMessageHandler(StringSE uri, @Nullable RestTemplate restTemplate) 非推奨、削除予定: この API 要素は、将来のバージョンで削除される可能性があります。7.1 はRestClientベースの構成を推奨しています。提供された RestTemplate を使用して、提供された URI にリクエストを送信するハンドラーを作成します。- パラメーター:
uri- URI。restTemplate- Rest テンプレート。
HttpRequestExecutingMessageHandler
@DeprecatedSE(since="7.1", forRemoval=true) public HttpRequestExecutingMessageHandler(Expression uriExpression, @Nullable RestTemplate restTemplate) 非推奨、削除予定: この API 要素は、将来のバージョンで削除される可能性があります。7.1 はRestClientベースの構成を推奨しています。提供された RestTemplate を使用して、提供された URI にリクエストを送信するハンドラーを作成します。- パラメーター:
uriExpression- メッセージオブジェクトおよびBeanFactoryに対して解決できる SpEL 式。restTemplate- Rest テンプレート。
HttpRequestExecutingMessageHandler
提供された RestClient を使用して、提供された URI にリクエストを送信するハンドラーを作成します。- パラメーター:
uri- URI。restClient- 残りのクライアント。- 導入:
- 7.1
HttpRequestExecutingMessageHandler
public HttpRequestExecutingMessageHandler(Expression uriExpression, @Nullable RestClient restClient) 提供された RestClient を使用して、提供された URI にリクエストを送信するハンドラーを作成します。- パラメーター:
uriExpression- メッセージオブジェクトおよびBeanFactoryに対して解決できる SpEL 式。restClient- 残りのクライアント。- 導入:
- 7.1
方法の詳細
getComponentType
- 次で指定:
- インターフェース
NamedComponent内のgetComponentType - オーバーライド:
- クラス
MessageHandlerSupportのgetComponentType
doInit
protected void doInit()- オーバーライド:
- クラス
AbstractHttpRequestExecutingMessageHandlerのdoInit
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
protected @Nullable ObjectSE exchange(ObjectSE uri, HttpMethod httpMethod, HttpEntity<?> httpRequest, ObjectSE expectedResponseType, Message<?> requestMessage, MapSE<StringSE, ?> uriVariables) - 次で指定:
- クラス
AbstractHttpRequestExecutingMessageHandlerのexchange
RestClientベースの構成を推奨しています。