Class BaseHttpMessageHandlerSpec<S extends BaseHttpMessageHandlerSpec<S,E>, E extends AbstractHttpRequestExecutingMessageHandler> 
java.lang.Object
org.springframework.integration.dsl.IntegrationComponentSpec<S,E>
 
org.springframework.integration.dsl.MessageHandlerSpec<S,E>
 
org.springframework.integration.http.dsl.BaseHttpMessageHandlerSpec<S,E> 
- Type Parameters:
- S- the target- BaseHttpMessageHandlerSpecimplementation type.
- E- the target- AbstractHttpRequestExecutingMessageHandlerimplementation type.
- All Implemented Interfaces:
- DisposableBean,- FactoryBean<E>,- InitializingBean,- Lifecycle,- Phased,- SmartLifecycle,- ComponentsRegistration
- Direct Known Subclasses:
- HttpMessageHandlerSpec,- WebFluxMessageHandlerSpec
public abstract class BaseHttpMessageHandlerSpec<S extends BaseHttpMessageHandlerSpec<S,E>, E extends AbstractHttpRequestExecutingMessageHandler> 
extends MessageHandlerSpec<S,E>
implements ComponentsRegistration 
The base 
MessageHandlerSpec for AbstractHttpRequestExecutingMessageHandlers.- Since:
- 5.0
- Author:
- Artem Bilan, Shiliang Li
- 
Field SummaryFields inherited from class org.springframework.integration.dsl.IntegrationComponentSpeclogger, PARSER, targetFields inherited from interface org.springframework.beans.factory.FactoryBeanOBJECT_TYPE_ATTRIBUTEFields inherited from interface org.springframework.context.SmartLifecycleDEFAULT_PHASE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionSpecify the charset name to use for converting String-typed payloads to bytes.encodingMode(DefaultUriBuilderFactory.EncodingMode encodingMode) Specify aDefaultUriBuilderFactory.EncodingModefor uri construction.expectedResponseType(Class<?> expectedResponseType) Specify the expected response type for the REST request.expectedResponseType(ParameterizedTypeReference<?> expectedResponseType) Specify aParameterizedTypeReferencefor the expected response type for the REST request.expectedResponseTypeExpression(Expression expectedResponseTypeExpression) Specify a SpELExpressionto determine the type for the expected response The returned value of the expression could be an instance ofClassorStringrepresenting a fully qualified class name.<P> SexpectedResponseTypeFunction(Function<Message<P>, ?> expectedResponseTypeFunction) protected SexpectReply(boolean expectReply) extractPayload(boolean extractPayload) Specify whether the outbound message's payload should be extracted when preparing the request body.extractResponseBody(boolean extractResponseBody) The flag to extract a body of theResponseEntityfor reply message payload.headerMapper(HeaderMapper<HttpHeaders> headerMapper) Set theHeaderMapperto use when mapping between HTTP headers andMessageHeaders.httpMethod(HttpMethod httpMethod) Specify theHttpMethodfor requests.httpMethodExpression(Expression httpMethodExpression) Specify the SpELExpressionto determineHttpMethodat runtime.<P> ShttpMethodFunction(Function<Message<P>, ?> httpMethodFunction) Specify aFunctionto determineHttpMethodat runtime.protected abstract booleanmappedRequestHeaders(String... patterns) Provide the pattern array for request headers to map.mappedResponseHeaders(String... patterns) Provide the pattern array for response headers to map.transferCookies(boolean transferCookies) Set totrueif you wishSet-Cookieheader in response to be transferred asCookieheader in subsequent interaction for a message.uriVariable(String variable, String expression) Specify a value SpEL expression for the uri template variable.<P> SuriVariable(String variable, Function<Message<P>, ?> valueFunction) Specify aFunctionto evaluate a value for the uri template variable.uriVariable(String variable, Expression expression) Specify anExpressionto evaluate a value for the uri template variable.uriVariableExpressions(Map<String, Expression> uriVariableExpressions) Set the Map of URI variable expressions to evaluate against the outbound message when replacing the variable placeholders in a URI template.uriVariablesExpression(String uriVariablesExpression) Specify a SpEL expression to evaluate aMapof URI variables at runtime against request message.uriVariablesExpression(Expression uriVariablesExpression) Specify a SpEL expression to evaluate aMapof URI variables at runtime against request message.<P> SuriVariablesFunction(Function<Message<P>, Map<String, ?>> uriVariablesFunction) Methods 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 java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.FactoryBeanisSingleton
- 
Constructor Details- 
BaseHttpMessageHandlerSpec
 
- 
- 
Method Details- 
expectReply
- 
encodingModeSpecify aDefaultUriBuilderFactory.EncodingModefor uri construction.- Parameters:
- encodingMode- to use for uri construction.
- Returns:
- the spec
- Since:
- 5.3
 
- 
httpMethodExpressionSpecify the SpELExpressionto determineHttpMethodat runtime.- Parameters:
- httpMethodExpression- The method expression.
- Returns:
- the spec
 
- 
httpMethodFunction
- 
httpMethodSpecify theHttpMethodfor requests. The default method isPOST.- Parameters:
- httpMethod- the- HttpMethodto use.
- Returns:
- the spec
 
- 
extractPayloadSpecify whether the outbound message's payload should be extracted when preparing the request body. Otherwise, the Message instance itself is serialized. The default value istrue.- Parameters:
- extractPayload- true if the payload should be extracted.
- Returns:
- the spec
 
- 
charset
- 
expectedResponseType
- 
expectedResponseTypeSpecify aParameterizedTypeReferencefor the expected response type for the REST request.- Parameters:
- expectedResponseType- The- ParameterizedTypeReferencefor expected type.
- Returns:
- the spec
 
- 
expectedResponseTypeExpressionSpecify a SpELExpressionto determine the type for the expected response The returned value of the expression could be an instance ofClassorStringrepresenting a fully qualified class name.- Parameters:
- expectedResponseTypeExpression- The expected response type expression.
- Returns:
- the spec
 
- 
expectedResponseTypeFunctionSpecify aFunctionto determine the type for the expected response The returned value of the expression could be an instance ofClassorStringrepresenting a fully qualified class name.- Type Parameters:
- P- the payload type.
- Parameters:
- expectedResponseTypeFunction- The expected response type- Function.
- Returns:
- the spec
 
- 
headerMapperSet theHeaderMapperto use when mapping between HTTP headers andMessageHeaders.- Parameters:
- headerMapper- The header mapper.
- Returns:
- the spec
 
- 
mappedRequestHeaders
- 
mappedResponseHeaders
- 
uriVariableExpressionsSet the Map of URI variable expressions to evaluate against the outbound message when replacing the variable placeholders in a URI template.- Parameters:
- uriVariableExpressions- The URI variable expressions.
- Returns:
- the current Spec.
- See Also:
 
- 
uriVariableSpecify anExpressionto evaluate a value for the uri template variable.- Parameters:
- variable- the uri template variable.
- expression- the expression to evaluate value for te uri template variable.
- Returns:
- the current Spec.
- See Also:
 
- 
uriVariable
- 
uriVariable
- 
uriVariablesExpression
- 
uriVariablesExpressionSpecify a SpEL expression to evaluate aMapof URI variables at runtime against request message.- Parameters:
- uriVariablesExpression- to use.
- Returns:
- the current Spec.
- See Also:
 
- 
uriVariablesFunction- Type Parameters:
- P- the payload type.
- Parameters:
- uriVariablesFunction- the- Functionto use.
- Returns:
- the current Spec.
- See Also:
 
- 
transferCookiesSet totrueif you wishSet-Cookieheader in response to be transferred asCookieheader in subsequent interaction for a message. Defaults to false.- Parameters:
- transferCookies- the transferCookies to set.
- Returns:
- the current Spec.
 
- 
extractResponseBodyThe flag to extract a body of theResponseEntityfor reply message payload. Defaults to true.- Parameters:
- extractResponseBody- produce a reply message with a whole- ResponseEntityor just its body.
- Returns:
- the current Spec.
- Since:
- 5.5
 
- 
getComponentsToRegister- Specified by:
- getComponentsToRegisterin interface- ComponentsRegistration
 
- 
isClientSetprotected abstract boolean isClientSet()
 
-