Class HttpMessageHandlerSpec
java.lang.Object
org.springframework.integration.dsl.IntegrationComponentSpec<HttpMessageHandlerSpec, HttpRequestExecutingMessageHandler>
org.springframework.integration.dsl.MessageHandlerSpec<HttpMessageHandlerSpec, HttpRequestExecutingMessageHandler>
org.springframework.integration.http.dsl.BaseHttpMessageHandlerSpec<HttpMessageHandlerSpec, HttpRequestExecutingMessageHandler>
org.springframework.integration.http.dsl.HttpMessageHandlerSpec
- All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<HttpRequestExecutingMessageHandler>, org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle, org.springframework.integration.dsl.ComponentsRegistration
public class HttpMessageHandlerSpec
extends BaseHttpMessageHandlerSpec<HttpMessageHandlerSpec, HttpRequestExecutingMessageHandler>
The
BaseHttpMessageHandlerSpec implementation for the HttpRequestExecutingMessageHandler.- Since:
- 5.0
- See Also:
-
Field Summary
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
logger, PARSER, targetFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTEFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHttpMessageHandlerSpec(String uri, @Nullable org.springframework.web.client.RestClient restClient) protectedHttpMessageHandlerSpec(String uri, @Nullable org.springframework.web.client.RestTemplate restTemplate) Deprecated, for removal: This API element is subject to removal in a future version.protectedHttpMessageHandlerSpec(URI uri, @Nullable org.springframework.web.client.RestClient restClient) protectedHttpMessageHandlerSpec(URI uri, @Nullable org.springframework.web.client.RestTemplate restTemplate) Deprecated, for removal: This API element is subject to removal in a future version.Since 7.1 in favor ofRestClient-based configuration.protectedHttpMessageHandlerSpec(org.springframework.expression.Expression uriExpression, @Nullable org.springframework.web.client.RestClient restClient) protectedHttpMessageHandlerSpec(org.springframework.expression.Expression uriExpression, @Nullable org.springframework.web.client.RestTemplate restTemplate) Deprecated, for removal: This API element is subject to removal in a future version.Since 7.1 in favor ofRestClient-based configuration. -
Method Summary
Modifier and TypeMethodDescriptionerrorHandler(org.springframework.web.client.ResponseErrorHandler errorHandler) Set theResponseErrorHandlerfor the underlyingRestTemplate.protected booleanmessageConverters(org.springframework.http.converter.HttpMessageConverter<?>... messageConverters) Set a list ofHttpMessageConverters to be used by the underlyingRestTemplate.requestFactory(org.springframework.http.client.ClientHttpRequestFactory requestFactory) Set theClientHttpRequestFactoryfor the underlyingRestTemplate.Methods inherited from class BaseHttpMessageHandlerSpec
charset, encodingMode, expectedResponseType, expectedResponseType, expectedResponseTypeExpression, expectedResponseTypeFunction, expectReply, extractPayload, extractResponseBody, getComponentsToRegister, headerMapper, httpMethod, httpMethodExpression, httpMethodFunction, mappedRequestHeaders, mappedResponseHeaders, transferCookies, uriVariable, uriVariable, uriVariable, uriVariableExpressions, uriVariablesExpression, uriVariablesExpression, uriVariablesFunctionMethods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, afterPropertiesSet, destroy, doGet, getId, getObject, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stopMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.FactoryBean
isSingletonMethods inherited from interface org.springframework.context.SmartLifecycle
isPauseable
-
Constructor Details
-
HttpMessageHandlerSpec
@Deprecated(since="7.1", forRemoval=true) protected HttpMessageHandlerSpec(URI uri, @Nullable org.springframework.web.client.RestTemplate restTemplate) Deprecated, for removal: This API element is subject to removal in a future version.Since 7.1 in favor ofRestClient-based configuration. -
HttpMessageHandlerSpec
@Deprecated(since="7.1", forRemoval=true) protected HttpMessageHandlerSpec(String uri, @Nullable org.springframework.web.client.RestTemplate restTemplate) Deprecated, for removal: This API element is subject to removal in a future version.Since 7.1 in favor ofRestClient-based configuration. -
HttpMessageHandlerSpec
@Deprecated(since="7.1", forRemoval=true) protected HttpMessageHandlerSpec(org.springframework.expression.Expression uriExpression, @Nullable org.springframework.web.client.RestTemplate restTemplate) Deprecated, for removal: This API element is subject to removal in a future version.Since 7.1 in favor ofRestClient-based configuration. -
HttpMessageHandlerSpec
protected HttpMessageHandlerSpec(URI uri, @Nullable org.springframework.web.client.RestClient restClient) -
HttpMessageHandlerSpec
protected HttpMessageHandlerSpec(String uri, @Nullable org.springframework.web.client.RestClient restClient) -
HttpMessageHandlerSpec
protected HttpMessageHandlerSpec(org.springframework.expression.Expression uriExpression, @Nullable org.springframework.web.client.RestClient restClient)
-
-
Method Details
-
requestFactory
public HttpMessageHandlerSpec requestFactory(org.springframework.http.client.ClientHttpRequestFactory requestFactory) Set theClientHttpRequestFactoryfor the underlyingRestTemplate.- Parameters:
requestFactory- The request factory.- Returns:
- the spec
-
errorHandler
public HttpMessageHandlerSpec errorHandler(org.springframework.web.client.ResponseErrorHandler errorHandler) Set theResponseErrorHandlerfor the underlyingRestTemplate.- Parameters:
errorHandler- The error handler.- Returns:
- the spec
-
messageConverters
public HttpMessageHandlerSpec messageConverters(org.springframework.http.converter.HttpMessageConverter<?>... messageConverters) Set a list ofHttpMessageConverters to be used by the underlyingRestTemplate. Converters configured via this method will override the default converters.- Parameters:
messageConverters- The message converters.- Returns:
- the spec
-
isClientSet
protected boolean isClientSet()- Specified by:
isClientSetin classBaseHttpMessageHandlerSpec<HttpMessageHandlerSpec, HttpRequestExecutingMessageHandler>
-
RestClient-based configuration.