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:
DisposableBean, FactoryBean<HttpRequestExecutingMessageHandler>, InitializingBean, Lifecycle, Phased, SmartLifecycle, ComponentsRegistration
public class HttpMessageHandlerSpec
extends BaseHttpMessageHandlerSpec<HttpMessageHandlerSpec, HttpRequestExecutingMessageHandler>
The
BaseHttpMessageHandlerSpec implementation for the HttpRequestExecutingMessageHandler.- Since:
- 5.0
- Author:
- Artem Bilan, Shiliang Li, Oleksii Komlyk, Arun Sethumadhavan, Glenn Renfro
- See Also:
-
Field Summary
Fields inherited from class IntegrationComponentSpec
logger, PARSER, targetFields inherited from interface FactoryBean
OBJECT_TYPE_ATTRIBUTEFields inherited from interface SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHttpMessageHandlerSpec(String uri, @Nullable RestClient restClient) protectedHttpMessageHandlerSpec(String uri, @Nullable RestTemplate restTemplate) Deprecated, for removal: This API element is subject to removal in a future version.protectedHttpMessageHandlerSpec(URI uri, @Nullable RestClient restClient) protectedHttpMessageHandlerSpec(URI uri, @Nullable 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(Expression uriExpression, @Nullable RestClient restClient) protectedHttpMessageHandlerSpec(Expression uriExpression, @Nullable 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 TypeMethodDescriptiondefaultStatusHandler(Predicate<HttpStatusCode> predicate, RestClient.ResponseSpec.ErrorHandler errorHandler) defaultStatusHandler(RestClient.ResponseSpec.ErrorHandler errorHandler) Set theRestClient.ResponseSpec.ErrorHandlerfor the underlyingRestClient, applied to anyerrorresponse status.errorHandler(ResponseErrorHandler errorHandler) Deprecated, for removal: This API element is subject to removal in a future version.Since 7.2 in favor ofRestClient.ResponseSpec.ErrorHandler.protected booleanmessageConverters(HttpMessageConverter<?>... messageConverters) Set a list ofHttpMessageConverters to be used by the underlyingRestClient.requestFactory(ClientHttpRequestFactory requestFactory) Deprecated, for removal: This API element is subject to removal in a future version.Since 7.2 in favor ofRestClient-based configuration.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 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 FactoryBean
isSingletonMethods inherited from interface SmartLifecycle
isPauseable
-
Constructor Details
-
HttpMessageHandlerSpec
@Deprecated(since="7.1", forRemoval=true) protected HttpMessageHandlerSpec(URI uri, @Nullable 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 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(Expression uriExpression, @Nullable 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
-
HttpMessageHandlerSpec
-
HttpMessageHandlerSpec
-
-
Method Details
-
requestFactory
@Deprecated(since="7.2", forRemoval=true) public HttpMessageHandlerSpec requestFactory(ClientHttpRequestFactory requestFactory) Deprecated, for removal: This API element is subject to removal in a future version.Since 7.2 in favor ofRestClient-based configuration.Set theClientHttpRequestFactoryfor the underlyingRestTemplate.- Parameters:
requestFactory- The request factory.- Returns:
- the spec
-
errorHandler
@Deprecated(since="7.2", forRemoval=true) public HttpMessageHandlerSpec errorHandler(ResponseErrorHandler errorHandler) Deprecated, for removal: This API element is subject to removal in a future version.Since 7.2 in favor ofRestClient.ResponseSpec.ErrorHandler.Set theResponseErrorHandlerfor the underlyingRestTemplate.- Parameters:
errorHandler- The error handler.- Returns:
- the spec
-
defaultStatusHandler
public HttpMessageHandlerSpec defaultStatusHandler(RestClient.ResponseSpec.ErrorHandler errorHandler) Set theRestClient.ResponseSpec.ErrorHandlerfor the underlyingRestClient, applied to anyerrorresponse status.- Parameters:
errorHandler- The error handler.- Returns:
- the spec
- Since:
- 7.2
-
defaultStatusHandler
public HttpMessageHandlerSpec defaultStatusHandler(Predicate<HttpStatusCode> predicate, RestClient.ResponseSpec.ErrorHandler errorHandler) - Parameters:
predicate- the predicate for the response status to match for this error handler.errorHandler- The error handler.- Returns:
- the spec
- Since:
- 7.2
-
messageConverters
Set a list ofHttpMessageConverters to be used by the underlyingRestClient. 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.