Class HeaderEnricherSpec
java.lang.Object
org.springframework.integration.dsl.IntegrationComponentSpec<HeaderEnricherSpec,reactor.util.function.Tuple2<ConsumerEndpointFactoryBean,MessageTransformingHandler>>
org.springframework.integration.dsl.EndpointSpec<HeaderEnricherSpec,ConsumerEndpointFactoryBean,MessageTransformingHandler>
org.springframework.integration.dsl.ConsumerEndpointSpec<HeaderEnricherSpec,MessageTransformingHandler>
org.springframework.integration.dsl.HeaderEnricherSpec
- All Implemented Interfaces:
DisposableBean,FactoryBean<reactor.util.function.Tuple2<ConsumerEndpointFactoryBean,,MessageTransformingHandler>> InitializingBean,Lifecycle,Phased,SmartLifecycle,ComponentsRegistration
public class HeaderEnricherSpec
extends ConsumerEndpointSpec<HeaderEnricherSpec,MessageTransformingHandler>
An
IntegrationComponentSpec for a HeaderEnricher.- Since:
- 5.0
- Author:
- Artem Bilan, Gary Russell
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final HeaderEnricherprotected final Map<String, HeaderValueMessageProcessor<?>> Fields inherited from class org.springframework.integration.dsl.ConsumerEndpointSpec
adviceChainFields inherited from class org.springframework.integration.dsl.EndpointSpec
componentsToRegister, endpointFactoryBean, handlerFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncorrelationId(Object correlationId) Add aIntegrationMessageHeaderAccessor.CORRELATION_IDheader.correlationId(Object correlationId, Boolean overwrite) Add aIntegrationMessageHeaderAccessor.CORRELATION_IDheader.correlationIdExpression(String correlationIdExpression) Add aIntegrationMessageHeaderAccessor.CORRELATION_IDheader where the value is a SpELExpressionevaluation result.correlationIdExpression(String correlationIdExpression, Boolean overwrite) Add aIntegrationMessageHeaderAccessor.CORRELATION_IDheader where the value is a SpELExpressionevaluation result.correlationIdFunction(Function<Message<P>, ?> correlationIdFunction, Boolean overwrite) Add aIntegrationMessageHeaderAccessor.CORRELATION_IDheader where the value is obtained by invoking theFunctioncallback.correlationIdFunction(Function<Message<P>, Object> correlationIdFunction) Add aIntegrationMessageHeaderAccessor.CORRELATION_IDheader where the value is obtained by invoking theFunctioncallback.defaultOverwrite(boolean defaultOverwrite) Determine the default action to take when setting individual header specifications without an explicit 'overwrite' argument.protected reactor.util.function.Tuple2<ConsumerEndpointFactoryBean, MessageTransformingHandler> doGet()errorChannel(Object errorChannel) Add aMessageHeaders.ERROR_CHANNELheader: bean name or instance.errorChannel(Object errorChannel, Boolean overwrite) Add aMessageHeaders.ERROR_CHANNELheader: bean name or instance.errorChannelExpression(String errorChannelExpression) Add aMessageHeaders.ERROR_CHANNELheader where the value is a SpELExpressionevaluation result.errorChannelExpression(String errorChannelExpression, Boolean overwrite) Add aMessageHeaders.ERROR_CHANNELheader where the value is a SpELExpressionevaluation result.errorChannelFunction(Function<Message<P>, ?> errorChannelFunction, Boolean overwrite) Add aMessageHeaders.ERROR_CHANNELheader where the value is obtained by invoking theFunctioncallback.errorChannelFunction(Function<Message<P>, Object> errorChannelFunction) Add aMessageHeaders.ERROR_CHANNELheader where the value is obtained by invoking theFunctioncallback.expirationDate(Object expirationDate) expirationDate(Object expirationDate, Boolean overwrite) Add aIntegrationMessageHeaderAccessor.EXPIRATION_DATEheader.expirationDateExpression(String expirationDateExpression) Add aIntegrationMessageHeaderAccessor.EXPIRATION_DATEheader where the value is a SpELExpressionevaluation result.expirationDateExpression(String expirationDateExpression, Boolean overwrite) Add aIntegrationMessageHeaderAccessor.EXPIRATION_DATEheader where the value is a SpELExpressionevaluation result.expirationDateFunction(Function<Message<P>, ?> expirationDateFunction, Boolean overwrite) Add aIntegrationMessageHeaderAccessor.EXPIRATION_DATEheader where the value is obtained by invoking theFunctioncallback.expirationDateFunction(Function<Message<P>, Object> expirationDateFunction) Add aIntegrationMessageHeaderAccessor.EXPIRATION_DATEheader where the value is obtained by invoking theFunctioncallback.header(String headerName, HeaderValueMessageProcessor<V> headerValueMessageProcessor) Add a single header specification where the value is obtained by calling theHeaderValueMessageProcessor.Add a single header specification.Add a single header specification.Add header specifications to automatically convert header channels (reply, error channels) to Strings and store them in a header channel registry.headerChannelsToString(String timeToLiveExpression) Add header specifications to automatically convert header channels (reply, error channels) to Strings and store them in a header channel registry.headerExpression(String name, String expression) Add a single header specification where the value is a String representation of a SpELExpression.headerExpression(String name, String expression, Boolean overwrite) Add a single header specification where the value is a String representation of a SpELExpression.headerExpressions(Consumer<StringStringMapBuilder> configurer) Add header specifications via the consumer callback, which receives aStringStringMapBuilder; theMapvalues must be String representations of SpEL expressions that will be evaluated at run time when the message headers are enriched.headerExpressions(Consumer<StringStringMapBuilder> configurer, Boolean overwrite) Add header specifications via the consumer callback, which receives aStringStringMapBuilder; theMapvalues must be String representations of SpEL expressions that will be evaluated at run time when the message headers are enriched.headerExpressions(Map<String, String> headers) Add header specifications; theMapvalues must be String representations of SpEL expressions that will be evaluated at run time when the message headers are enriched.headerExpressions(Map<String, String> headers, Boolean overwrite) Add header specifications; theMapvalues must be String representations of SpEL expressions that will be evaluated at run time when the message headers are enriched.headerExpressions(MapBuilder<?, String, String> headers) Add header specifications from theMapBuilder; theMapvalues must be String representations of SpEL expressions that will be evaluated at run time when the message headers are enriched.headerExpressions(MapBuilder<?, String, String> headers, Boolean overwrite) Add header specifications from theMapBuilder; theMapvalues must be String representations of SpEL expressions that will be evaluated at run time when the message headers are enriched.headerFunction(String name, Function<Message<P>, ?> function) Add a single header specification where the value is obtained by invoking theFunctioncallback.headerFunction(String name, Function<Message<P>, ?> function, Boolean overwrite) Add a single header specification where the value is obtained by invoking theFunctioncallback.Add header specifications from theMap; if a map value is anExpression, it will be evaluated at run time when the message headers are enriched.Add header specifications from theMap; if a map value is anExpression, it will be evaluated at run time when the message headers are enriched.headers(MapBuilder<?, String, Object> headers) Add header specifications from theMapBuilder; if a map value is anExpression, it will be evaluated at run time when the message headers are enriched.headers(MapBuilder<?, String, Object> headers, Boolean overwrite) Add header specifications from theMapBuilder; if a map value is anExpression, it will be evaluated at run time when the message headers are enriched.messageProcessor(String expression) Configure anExpressionEvaluatingMessageProcessorthat evaluates to aMapof additional headers.messageProcessor(String beanName, String methodName) Configure anMethodInvokingMessageProcessorthat invokes the method on the bean - the method must return aMapof headers.messageProcessor(MessageProcessor<?> messageProcessor) Configure an optional customMessageProcessorfor the enricher.Add aIntegrationMessageHeaderAccessor.PRIORITYheader.Add aIntegrationMessageHeaderAccessor.PRIORITYheader.priorityExpression(String priorityExpression) Add aIntegrationMessageHeaderAccessor.PRIORITYheader where the value is a SpELExpressionevaluation result.priorityExpression(String priorityExpression, Boolean overwrite) Add aIntegrationMessageHeaderAccessor.PRIORITYheader where the value is a SpELExpressionevaluation result.priorityFunction(Function<Message<P>, ?> priorityFunction, Boolean overwrite) Add aIntegrationMessageHeaderAccessor.PRIORITYheader where the value is obtained by invoking theFunctioncallback.priorityFunction(Function<Message<P>, Object> priorityFunction) Add aIntegrationMessageHeaderAccessor.PRIORITYheader where the value is obtained by invoking theFunctioncallback.replyChannel(Object replyChannel) Add aMessageHeaders.REPLY_CHANNELheader: bean name or instance.replyChannel(Object replyChannel, Boolean overwrite) Add aMessageHeaders.REPLY_CHANNELheader: bean name or instance.replyChannelExpression(String replyChannelExpression) Add aMessageHeaders.REPLY_CHANNELheader where the value is a SpELExpressionevaluation result.replyChannelExpression(String replyChannelExpression, Boolean overwrite) Add aMessageHeaders.REPLY_CHANNELheader where the value is a SpELExpressionevaluation result.replyChannelFunction(Function<Message<P>, ?> replyChannelFunction, Boolean overwrite) Add aMessageHeaders.REPLY_CHANNELheader where the value is obtained by invoking theFunctioncallback.replyChannelFunction(Function<Message<P>, Object> replyChannelFunction) Add aMessageHeaders.REPLY_CHANNELheader where the value is obtained by invoking theFunctioncallback.routingSlip(Boolean overwrite, Object... routingSlipPath) Add aIntegrationMessageHeaderAccessor.ROUTING_SLIPheader.routingSlip(Object... routingSlipPath) Add aIntegrationMessageHeaderAccessor.ROUTING_SLIPheader.shouldSkipNulls(boolean shouldSkipNulls) Methods inherited from class org.springframework.integration.dsl.ConsumerEndpointSpec
advice, async, autoStartup, customizeMonoReply, handleMessageAdvice, notPropagatedHeaders, order, phase, poller, reactive, reactive, requiresReply, role, sendTimeout, taskScheduler, transactional, transactional, transactional, transactional, transactionalMethods inherited from class org.springframework.integration.dsl.EndpointSpec
assertHandler, getComponentsToRegister, id, obtainInputChannelFromFlow, obtainInputChannelFromFlow, poller, pollerMethods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, afterPropertiesSet, destroy, getId, getObject, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.FactoryBean
isSingleton
-
Field Details
-
headerToAdd
-
headerEnricher
-
-
Constructor Details
-
HeaderEnricherSpec
protected HeaderEnricherSpec()
-
-
Method Details
-
defaultOverwrite
Determine the default action to take when setting individual header specifications without an explicit 'overwrite' argument.- Parameters:
defaultOverwrite- the defaultOverwrite.- Returns:
- the header enricher spec.
- See Also:
-
shouldSkipNulls
- Parameters:
shouldSkipNulls- the shouldSkipNulls.- Returns:
- the header enricher spec.
- See Also:
-
messageProcessor
Configure an optional customMessageProcessorfor the enricher. The processor must return aMapof header names and values. They will be added to the inbound message headers before evaluating the individual configured header specifications.- Parameters:
messageProcessor- the messageProcessor.- Returns:
- the header enricher spec.
- See Also:
-
messageProcessor
Configure anExpressionEvaluatingMessageProcessorthat evaluates to aMapof additional headers. They will be added to the inbound message headers before evaluating the individual configured header specifications.- Parameters:
expression- the expression.- Returns:
- the header enricher spec.
- See Also:
-
messageProcessor
Configure anMethodInvokingMessageProcessorthat invokes the method on the bean - the method must return aMapof headers. They will be added to the inbound message headers before evaluating the individual configured header specifications.- Parameters:
beanName- The bean name.methodName- The method name.- Returns:
- the header enricher spec.
- See Also:
-
headers
Add header specifications from theMapBuilder; if a map value is anExpression, it will be evaluated at run time when the message headers are enriched. Otherwise, the value is simply added to the headers. Headers derived from the map will not overwrite existing headers, unlessdefaultOverwrite(boolean)is true.- Parameters:
headers- the header map builder.- Returns:
- the header enricher spec.
-
headers
Add header specifications from theMapBuilder; if a map value is anExpression, it will be evaluated at run time when the message headers are enriched. Otherwise, the value is simply added to the headers.- Parameters:
headers- the header map builder.overwrite- true to overwrite existing headers.- Returns:
- the header enricher spec.
-
headers
Add header specifications from theMap; if a map value is anExpression, it will be evaluated at run time when the message headers are enriched. Otherwise, the value is simply added to the headers. Headers derived from the map will not overwrite existing headers, unlessdefaultOverwrite(boolean)is true.- Parameters:
headers- The header builder.- Returns:
- the header enricher spec.
-
headers
Add header specifications from theMap; if a map value is anExpression, it will be evaluated at run time when the message headers are enriched. Otherwise, the value is simply added to the headers.- Parameters:
headers- The header builder.overwrite- true to overwrite existing headers.- Returns:
- the header enricher spec.
-
headerExpressions
Add header specifications from theMapBuilder; theMapvalues must be String representations of SpEL expressions that will be evaluated at run time when the message headers are enriched. Headers derived from the map will not overwrite existing headers, unlessdefaultOverwrite(boolean)is true.- Parameters:
headers- the header map builder.- Returns:
- the header enricher spec.
-
headerExpressions
public HeaderEnricherSpec headerExpressions(MapBuilder<?, String, String> headers, @Nullable Boolean overwrite) Add header specifications from theMapBuilder; theMapvalues must be String representations of SpEL expressions that will be evaluated at run time when the message headers are enriched.- Parameters:
headers- the header map builder.overwrite- true to overwrite existing headers.- Returns:
- the header enricher spec.
-
headerExpressions
Add header specifications via the consumer callback, which receives aStringStringMapBuilder; theMapvalues must be String representations of SpEL expressions that will be evaluated at run time when the message headers are enriched. Headers derived from the map will not overwrite existing headers, unlessdefaultOverwrite(boolean)is true. Usually used with a JDK8 lambda:.enrichHeaders(s -> s.headerExpressions(c -> c .put(MailHeaders.SUBJECT, "payload.subject") .put(MailHeaders.FROM, "payload.from[0].toString()")))- Parameters:
configurer- the configurer.- Returns:
- the header enricher spec.
-
headerExpressions
public HeaderEnricherSpec headerExpressions(Consumer<StringStringMapBuilder> configurer, @Nullable Boolean overwrite) Add header specifications via the consumer callback, which receives aStringStringMapBuilder; theMapvalues must be String representations of SpEL expressions that will be evaluated at run time when the message headers are enriched. Usually used with a JDK8 lambda:.enrichHeaders(s -> s.headerExpressions(c -> c .put(MailHeaders.SUBJECT, "payload.subject") .put(MailHeaders.FROM, "payload.from[0].toString()"), true))- Parameters:
configurer- the configurer.overwrite- true to overwrite existing headers.- Returns:
- the header enricher spec.
-
headerExpressions
Add header specifications; theMapvalues must be String representations of SpEL expressions that will be evaluated at run time when the message headers are enriched. Headers derived from the map will not overwrite existing headers, unlessdefaultOverwrite(boolean)is true.- Parameters:
headers- the headers.- Returns:
- the header enricher spec.
-
headerExpressions
public HeaderEnricherSpec headerExpressions(Map<String, String> headers, @Nullable Boolean overwrite) Add header specifications; theMapvalues must be String representations of SpEL expressions that will be evaluated at run time when the message headers are enriched.- Parameters:
headers- the headers.overwrite- true to overwrite existing headers.- Returns:
- the header enricher spec.
-
correlationId
Add aIntegrationMessageHeaderAccessor.CORRELATION_IDheader. If the header exists, it will not be overwritten unlessdefaultOverwrite(boolean)is true.- Parameters:
correlationId- the header value forIntegrationMessageHeaderAccessor.CORRELATION_ID.- Returns:
- the header enricher spec.
- Since:
- 5.2
-
correlationId
Add aIntegrationMessageHeaderAccessor.CORRELATION_IDheader.- Parameters:
correlationId- the header value forIntegrationMessageHeaderAccessor.CORRELATION_ID.overwrite- true to overwrite an existing header.- Returns:
- the header enricher spec.
- Since:
- 5.2
-
correlationIdExpression
Add aIntegrationMessageHeaderAccessor.CORRELATION_IDheader where the value is a SpELExpressionevaluation result. If the header exists, it will not be overwritten unlessdefaultOverwrite(boolean)is true.- Parameters:
correlationIdExpression- the expression forIntegrationMessageHeaderAccessor.CORRELATION_IDheader.- Returns:
- the header enricher spec.
- Since:
- 5.2
-
correlationIdExpression
public HeaderEnricherSpec correlationIdExpression(String correlationIdExpression, @Nullable Boolean overwrite) Add aIntegrationMessageHeaderAccessor.CORRELATION_IDheader where the value is a SpELExpressionevaluation result.- Parameters:
correlationIdExpression- the expression forIntegrationMessageHeaderAccessor.CORRELATION_IDheader.overwrite- true to overwrite an existing header.- Returns:
- the header enricher spec.
- Since:
- 5.2
-
correlationIdFunction
public <P> HeaderEnricherSpec correlationIdFunction(Function<Message<P>, Object> correlationIdFunction) Add aIntegrationMessageHeaderAccessor.CORRELATION_IDheader where the value is obtained by invoking theFunctioncallback. If the header exists, it will not be overwritten unlessdefaultOverwrite(boolean)is true.- Type Parameters:
P- the payload type.- Parameters:
correlationIdFunction- the function.- Returns:
- the header enricher spec.
- Since:
- 5.2
- See Also:
-
correlationIdFunction
public <P> HeaderEnricherSpec correlationIdFunction(Function<Message<P>, ?> correlationIdFunction, @Nullable Boolean overwrite) Add aIntegrationMessageHeaderAccessor.CORRELATION_IDheader where the value is obtained by invoking theFunctioncallback.- Type Parameters:
P- the payload type.- Parameters:
correlationIdFunction- the function.overwrite- true to overwrite an existing header.- Returns:
- the header enricher spec.
- Since:
- 5.2
- See Also:
-
replyChannel
Add aMessageHeaders.REPLY_CHANNELheader: bean name or instance. If the header exists, it will not be overwritten unlessdefaultOverwrite(boolean)is true.- Parameters:
replyChannel- the header value forMessageHeaders.REPLY_CHANNEL.- Returns:
- the header enricher spec.
- Since:
- 5.2
-
replyChannel
Add aMessageHeaders.REPLY_CHANNELheader: bean name or instance.- Parameters:
replyChannel- the header value forMessageHeaders.REPLY_CHANNEL.overwrite- true to overwrite an existing header.- Returns:
- the header enricher spec.
- Since:
- 5.2
-
replyChannelExpression
Add aMessageHeaders.REPLY_CHANNELheader where the value is a SpELExpressionevaluation result. If the header exists, it will not be overwritten unlessdefaultOverwrite(boolean)is true.- Parameters:
replyChannelExpression- the expression forMessageHeaders.REPLY_CHANNELheader.- Returns:
- the header enricher spec.
- Since:
- 5.2
-
replyChannelExpression
public HeaderEnricherSpec replyChannelExpression(String replyChannelExpression, @Nullable Boolean overwrite) Add aMessageHeaders.REPLY_CHANNELheader where the value is a SpELExpressionevaluation result.- Parameters:
replyChannelExpression- the expression forMessageHeaders.REPLY_CHANNELheader.overwrite- true to overwrite an existing header.- Returns:
- the header enricher spec.
- Since:
- 5.2
-
replyChannelFunction
public <P> HeaderEnricherSpec replyChannelFunction(Function<Message<P>, Object> replyChannelFunction) Add aMessageHeaders.REPLY_CHANNELheader where the value is obtained by invoking theFunctioncallback. If the header exists, it will not be overwritten unlessdefaultOverwrite(boolean)is true.- Type Parameters:
P- the payload type.- Parameters:
replyChannelFunction- the function.- Returns:
- the header enricher spec.
- Since:
- 5.2
- See Also:
-
replyChannelFunction
public <P> HeaderEnricherSpec replyChannelFunction(Function<Message<P>, ?> replyChannelFunction, @Nullable Boolean overwrite) Add aMessageHeaders.REPLY_CHANNELheader where the value is obtained by invoking theFunctioncallback.- Type Parameters:
P- the payload type.- Parameters:
replyChannelFunction- the function.overwrite- true to overwrite an existing header.- Returns:
- the header enricher spec.
- Since:
- 5.2
- See Also:
-
errorChannel
Add aMessageHeaders.ERROR_CHANNELheader: bean name or instance. If the header exists, it will not be overwritten unlessdefaultOverwrite(boolean)is true.- Parameters:
errorChannel- the header value forMessageHeaders.ERROR_CHANNEL.- Returns:
- the header enricher spec.
- Since:
- 5.2
-
errorChannel
Add aMessageHeaders.ERROR_CHANNELheader: bean name or instance.- Parameters:
errorChannel- the header value forMessageHeaders.ERROR_CHANNEL.overwrite- true to overwrite an existing header.- Returns:
- the header enricher spec.
- Since:
- 5.2
-
errorChannelExpression
Add aMessageHeaders.ERROR_CHANNELheader where the value is a SpELExpressionevaluation result. If the header exists, it will not be overwritten unlessdefaultOverwrite(boolean)is true.- Parameters:
errorChannelExpression- the expression forMessageHeaders.ERROR_CHANNELheader.- Returns:
- the header enricher spec.
- Since:
- 5.2
-
errorChannelExpression
public HeaderEnricherSpec errorChannelExpression(String errorChannelExpression, @Nullable Boolean overwrite) Add aMessageHeaders.ERROR_CHANNELheader where the value is a SpELExpressionevaluation result.- Parameters:
errorChannelExpression- the expression forMessageHeaders.ERROR_CHANNELheader.overwrite- true to overwrite an existing header.- Returns:
- the header enricher spec.
- Since:
- 5.2
-
errorChannelFunction
public <P> HeaderEnricherSpec errorChannelFunction(Function<Message<P>, Object> errorChannelFunction) Add aMessageHeaders.ERROR_CHANNELheader where the value is obtained by invoking theFunctioncallback. If the header exists, it will not be overwritten unlessdefaultOverwrite(boolean)is true.- Type Parameters:
P- the payload type.- Parameters:
errorChannelFunction- the function.- Returns:
- the header enricher spec.
- Since:
- 5.2
- See Also:
-
errorChannelFunction
public <P> HeaderEnricherSpec errorChannelFunction(Function<Message<P>, ?> errorChannelFunction, @Nullable Boolean overwrite) Add aMessageHeaders.ERROR_CHANNELheader where the value is obtained by invoking theFunctioncallback.- Type Parameters:
P- the payload type.- Parameters:
errorChannelFunction- the function.overwrite- true to overwrite an existing header.- Returns:
- the header enricher spec.
- Since:
- 5.2
- See Also:
-
priority
Add aIntegrationMessageHeaderAccessor.PRIORITYheader. If the header exists, it will not be overwritten unlessdefaultOverwrite(boolean)is true.- Parameters:
priority- the header value forIntegrationMessageHeaderAccessor.PRIORITY.- Returns:
- the header enricher spec.
- Since:
- 5.2
-
priority
Add aIntegrationMessageHeaderAccessor.PRIORITYheader.- Parameters:
priority- the header value forIntegrationMessageHeaderAccessor.PRIORITY.overwrite- true to overwrite an existing header.- Returns:
- the header enricher spec.
- Since:
- 5.2
-
priorityExpression
Add aIntegrationMessageHeaderAccessor.PRIORITYheader where the value is a SpELExpressionevaluation result. If the header exists, it will not be overwritten unlessdefaultOverwrite(boolean)is true.- Parameters:
priorityExpression- the expression forIntegrationMessageHeaderAccessor.PRIORITYheader.- Returns:
- the header enricher spec.
- Since:
- 5.2
-
priorityExpression
public HeaderEnricherSpec priorityExpression(String priorityExpression, @Nullable Boolean overwrite) Add aIntegrationMessageHeaderAccessor.PRIORITYheader where the value is a SpELExpressionevaluation result.- Parameters:
priorityExpression- the expression forIntegrationMessageHeaderAccessor.PRIORITYheader.overwrite- true to overwrite an existing header.- Returns:
- the header enricher spec.
- Since:
- 5.2
-
priorityFunction
Add aIntegrationMessageHeaderAccessor.PRIORITYheader where the value is obtained by invoking theFunctioncallback. If the header exists, it will not be overwritten unlessdefaultOverwrite(boolean)is true.- Type Parameters:
P- the payload type.- Parameters:
priorityFunction- the function.- Returns:
- the header enricher spec.
- Since:
- 5.2
- See Also:
-
priorityFunction
public <P> HeaderEnricherSpec priorityFunction(Function<Message<P>, ?> priorityFunction, @Nullable Boolean overwrite) Add aIntegrationMessageHeaderAccessor.PRIORITYheader where the value is obtained by invoking theFunctioncallback.- Type Parameters:
P- the payload type.- Parameters:
priorityFunction- the function.overwrite- true to overwrite an existing header.- Returns:
- the header enricher spec.
- Since:
- 5.2
- See Also:
-
expirationDate
Add aIntegrationMessageHeaderAccessor.EXPIRATION_DATEheader:Dateorlong. If the header exists, it will not be overwritten unlessdefaultOverwrite(boolean)is true.- Parameters:
expirationDate- the header value forIntegrationMessageHeaderAccessor.EXPIRATION_DATE.- Returns:
- the header enricher spec.
- Since:
- 5.2
-
expirationDate
Add aIntegrationMessageHeaderAccessor.EXPIRATION_DATEheader.- Parameters:
expirationDate- the header value forIntegrationMessageHeaderAccessor.EXPIRATION_DATE.overwrite- true to overwrite an existing header.- Returns:
- the header enricher spec.
- Since:
- 5.2
-
expirationDateExpression
Add aIntegrationMessageHeaderAccessor.EXPIRATION_DATEheader where the value is a SpELExpressionevaluation result. If the header exists, it will not be overwritten unlessdefaultOverwrite(boolean)is true.- Parameters:
expirationDateExpression- the expression forIntegrationMessageHeaderAccessor.EXPIRATION_DATEheader.- Returns:
- the header enricher spec.
- Since:
- 5.2
-
expirationDateExpression
public HeaderEnricherSpec expirationDateExpression(String expirationDateExpression, @Nullable Boolean overwrite) Add aIntegrationMessageHeaderAccessor.EXPIRATION_DATEheader where the value is a SpELExpressionevaluation result.- Parameters:
expirationDateExpression- the expression forIntegrationMessageHeaderAccessor.EXPIRATION_DATEheader.overwrite- true to overwrite an existing header.- Returns:
- the header enricher spec.
- Since:
- 5.2
-
expirationDateFunction
public <P> HeaderEnricherSpec expirationDateFunction(Function<Message<P>, Object> expirationDateFunction) Add aIntegrationMessageHeaderAccessor.EXPIRATION_DATEheader where the value is obtained by invoking theFunctioncallback. If the header exists, it will not be overwritten unlessdefaultOverwrite(boolean)is true.- Type Parameters:
P- the payload type.- Parameters:
expirationDateFunction- the function.- Returns:
- the header enricher spec.
- Since:
- 5.2
- See Also:
-
expirationDateFunction
public <P> HeaderEnricherSpec expirationDateFunction(Function<Message<P>, ?> expirationDateFunction, @Nullable Boolean overwrite) Add aIntegrationMessageHeaderAccessor.EXPIRATION_DATEheader where the value is obtained by invoking theFunctioncallback.- Type Parameters:
P- the payload type.- Parameters:
expirationDateFunction- the function.overwrite- true to overwrite an existing header.- Returns:
- the header enricher spec.
- Since:
- 5.2
- See Also:
-
routingSlip
Add aIntegrationMessageHeaderAccessor.ROUTING_SLIPheader. The possible values are:- A
MessageChannelinstance. - A
MessageChannelbean name. - A
RoutingSlipRouteStrategyinstance. - A
RoutingSlipRouteStrategybean name. - A
Stringfor SpEL expression which has to be evaluated to theMessageChannelorRoutingSlipRouteStrategy.
defaultOverwrite(boolean)is true.- Parameters:
routingSlipPath- the header value forIntegrationMessageHeaderAccessor.ROUTING_SLIP.- Returns:
- the header enricher spec.
- Since:
- 5.2
- A
-
routingSlip
Add aIntegrationMessageHeaderAccessor.ROUTING_SLIPheader. The possible values are:- A
MessageChannelinstance. - A
MessageChannelbean name. - A
RoutingSlipRouteStrategyinstance. - A
RoutingSlipRouteStrategybean name. - A
Stringfor SpEL expression which has to be evaluated to theMessageChannelorRoutingSlipRouteStrategy.
- Parameters:
overwrite- true to overwrite an existing header.routingSlipPath- the header value forIntegrationMessageHeaderAccessor.ROUTING_SLIP.- Returns:
- the header enricher spec.
- Since:
- 5.2
- A
-
header
Add a single header specification. If the header exists, it will not be overwritten unlessdefaultOverwrite(boolean)is true.- Type Parameters:
V- the value type.- Parameters:
name- the header name.value- the header value (not anExpression).- Returns:
- the header enricher spec.
-
header
Add a single header specification.- Type Parameters:
V- the value type.- Parameters:
name- the header name.value- the header value (not anExpression).overwrite- true to overwrite an existing header.- Returns:
- the header enricher spec.
-
headerExpression
Add a single header specification where the value is a String representation of a SpELExpression. If the header exists, it will not be overwritten unlessdefaultOverwrite(boolean)is true.- Parameters:
name- the header name.expression- the expression.- Returns:
- the header enricher spec.
-
headerExpression
public HeaderEnricherSpec headerExpression(String name, String expression, @Nullable Boolean overwrite) Add a single header specification where the value is a String representation of a SpELExpression.- Parameters:
name- the header name.expression- the expression.overwrite- true to overwrite an existing header.- Returns:
- the header enricher spec.
-
headerFunction
Add a single header specification where the value is obtained by invoking theFunctioncallback. If the header exists, it will not be overwritten unlessdefaultOverwrite(boolean)is true.- Type Parameters:
P- the payload type.- Parameters:
name- the header name.function- the function.- Returns:
- the header enricher spec.
- See Also:
-
headerFunction
public <P> HeaderEnricherSpec headerFunction(String name, Function<Message<P>, ?> function, @Nullable Boolean overwrite) Add a single header specification where the value is obtained by invoking theFunctioncallback.- Type Parameters:
P- the payload type.- Parameters:
name- the header name.function- the function.overwrite- true to overwrite an existing header.- Returns:
- the header enricher spec.
- See Also:
-
header
public <V> HeaderEnricherSpec header(String headerName, HeaderValueMessageProcessor<V> headerValueMessageProcessor) Add a single header specification where the value is obtained by calling theHeaderValueMessageProcessor.- Type Parameters:
V- the value type.- Parameters:
headerName- the header name.headerValueMessageProcessor- the message processor.- Returns:
- the header enricher spec.
-
headerChannelsToString
Add header specifications to automatically convert header channels (reply, error channels) to Strings and store them in a header channel registry. Allows persistence and serialization of messages without losing these important framework headers.- Returns:
- the header enricher spec.
- See Also:
-
headerChannelsToString
Add header specifications to automatically convert header channels (reply, error channels) to Strings and store them in a header channel registry. Allows persistence and serialization of messages without losing these important framework headers.- Parameters:
timeToLiveExpression- the minimum time that the mapping will remain in the registry.- Returns:
- the header enricher spec.
- See Also:
-
doGet
protected reactor.util.function.Tuple2<ConsumerEndpointFactoryBean,MessageTransformingHandler> doGet()- Overrides:
doGetin classConsumerEndpointSpec<HeaderEnricherSpec,MessageTransformingHandler>
-