public class HeaderEnricherSpec extends ConsumerEndpointSpec<HeaderEnricherSpec,MessageTransformingHandler>
IntegrationComponentSpec
for a HeaderEnricher
.Modifier and Type | Field and Description |
---|---|
protected HeaderEnricher |
headerEnricher |
protected Map<String,HeaderValueMessageProcessor<?>> |
headerToAdd |
adviceChain
componentsToRegister, endpointFactoryBean, handler
PARSER, target
logger
DEFAULT_PHASE
OBJECT_TYPE_ATTRIBUTE
Modifier | Constructor and Description |
---|---|
protected |
HeaderEnricherSpec() |
Modifier and Type | Method and Description |
---|---|
HeaderEnricherSpec |
correlationId(Object correlationId)
Add a
IntegrationMessageHeaderAccessor.CORRELATION_ID header. |
HeaderEnricherSpec |
correlationId(Object correlationId,
Boolean overwrite)
Add a
IntegrationMessageHeaderAccessor.CORRELATION_ID header. |
HeaderEnricherSpec |
correlationIdExpression(String correlationIdExpression)
Add a
IntegrationMessageHeaderAccessor.CORRELATION_ID header
where the value is a SpEL Expression evaluation result. |
HeaderEnricherSpec |
correlationIdExpression(String correlationIdExpression,
Boolean overwrite)
Add a
IntegrationMessageHeaderAccessor.CORRELATION_ID header
where the value is a SpEL Expression evaluation result. |
<P> HeaderEnricherSpec |
correlationIdFunction(java.util.function.Function<Message<P>,?> correlationIdFunction,
Boolean overwrite)
Add a
IntegrationMessageHeaderAccessor.CORRELATION_ID header where the
value is obtained by invoking the Function callback. |
<P> HeaderEnricherSpec |
correlationIdFunction(java.util.function.Function<Message<P>,Object> correlationIdFunction)
Add a
IntegrationMessageHeaderAccessor.CORRELATION_ID header where the
value is obtained by invoking the Function callback. |
HeaderEnricherSpec |
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() |
HeaderEnricherSpec |
errorChannel(Object errorChannel)
Add a
MessageHeaders.ERROR_CHANNEL header: bean name or instance. |
HeaderEnricherSpec |
errorChannel(Object errorChannel,
Boolean overwrite)
Add a
MessageHeaders.ERROR_CHANNEL header: bean name or instance. |
HeaderEnricherSpec |
errorChannelExpression(String errorChannelExpression)
Add a
MessageHeaders.ERROR_CHANNEL header
where the value is a SpEL Expression evaluation result. |
HeaderEnricherSpec |
errorChannelExpression(String errorChannelExpression,
Boolean overwrite)
Add a
MessageHeaders.ERROR_CHANNEL header
where the value is a SpEL Expression evaluation result. |
<P> HeaderEnricherSpec |
errorChannelFunction(java.util.function.Function<Message<P>,?> errorChannelFunction,
Boolean overwrite)
Add a
MessageHeaders.ERROR_CHANNEL header where the
value is obtained by invoking the Function callback. |
<P> HeaderEnricherSpec |
errorChannelFunction(java.util.function.Function<Message<P>,Object> errorChannelFunction)
Add a
MessageHeaders.ERROR_CHANNEL header where the
value is obtained by invoking the Function callback. |
HeaderEnricherSpec |
expirationDate(Object expirationDate)
|
HeaderEnricherSpec |
expirationDate(Object expirationDate,
Boolean overwrite)
Add a
IntegrationMessageHeaderAccessor.EXPIRATION_DATE header. |
HeaderEnricherSpec |
expirationDateExpression(String expirationDateExpression)
Add a
IntegrationMessageHeaderAccessor.EXPIRATION_DATE header
where the value is a SpEL Expression evaluation result. |
HeaderEnricherSpec |
expirationDateExpression(String expirationDateExpression,
Boolean overwrite)
Add a
IntegrationMessageHeaderAccessor.EXPIRATION_DATE header
where the value is a SpEL Expression evaluation result. |
<P> HeaderEnricherSpec |
expirationDateFunction(java.util.function.Function<Message<P>,?> expirationDateFunction,
Boolean overwrite)
Add a
IntegrationMessageHeaderAccessor.EXPIRATION_DATE header where the
value is obtained by invoking the Function callback. |
<P> HeaderEnricherSpec |
expirationDateFunction(java.util.function.Function<Message<P>,Object> expirationDateFunction)
Add a
IntegrationMessageHeaderAccessor.EXPIRATION_DATE header where the
value is obtained by invoking the Function callback. |
<V> HeaderEnricherSpec |
header(String headerName,
HeaderValueMessageProcessor<V> headerValueMessageProcessor)
Add a single header specification where the value is obtained by calling the
HeaderValueMessageProcessor . |
<V> HeaderEnricherSpec |
header(String name,
V value)
Add a single header specification.
|
<V> HeaderEnricherSpec |
header(String name,
V value,
Boolean overwrite)
Add a single header specification.
|
HeaderEnricherSpec |
headerChannelsToString()
Add header specifications to automatically convert header channels (reply, error
channels) to Strings and store them in a header channel registry.
|
HeaderEnricherSpec |
headerChannelsToString(String timeToLiveExpression)
Add header specifications to automatically convert header channels (reply, error
channels) to Strings and store them in a header channel registry.
|
HeaderEnricherSpec |
headerExpression(String name,
String expression)
Add a single header specification where the value is a String representation of a
SpEL
Expression . |
HeaderEnricherSpec |
headerExpression(String name,
String expression,
Boolean overwrite)
Add a single header specification where the value is a String representation of a
SpEL
Expression . |
HeaderEnricherSpec |
headerExpressions(java.util.function.Consumer<StringStringMapBuilder> configurer)
Add header specifications via the consumer callback, which receives a
StringStringMapBuilder ; the Map values must be String
representations of SpEL expressions that will be evaluated at run time when the
message headers are enriched. |
HeaderEnricherSpec |
headerExpressions(java.util.function.Consumer<StringStringMapBuilder> configurer,
Boolean overwrite)
Add header specifications via the consumer callback, which receives a
StringStringMapBuilder ; the Map values must be String
representations of SpEL expressions that will be evaluated at run time when the
message headers are enriched. |
HeaderEnricherSpec |
headerExpressions(Map<String,String> headers)
Add header specifications; the
Map values must be String representations
of SpEL expressions that will be evaluated at run time when the message headers are
enriched. |
HeaderEnricherSpec |
headerExpressions(Map<String,String> headers,
Boolean overwrite)
Add header specifications; the
Map values must be String representations of
SpEL expressions that will be evaluated at run time when the message headers are
enriched. |
HeaderEnricherSpec |
headerExpressions(MapBuilder<?,String,String> headers)
Add header specifications from the
MapBuilder ; the Map values must
be String representations of SpEL expressions that will be evaluated at run time
when the message headers are enriched. |
HeaderEnricherSpec |
headerExpressions(MapBuilder<?,String,String> headers,
Boolean overwrite)
Add header specifications from the
MapBuilder ; the Map values must
be String representations of SpEL expressions that will be evaluated at run time
when the message headers are enriched. |
<P> HeaderEnricherSpec |
headerFunction(String name,
java.util.function.Function<Message<P>,?> function)
Add a single header specification where the value is obtained by invoking the
Function callback. |
<P> HeaderEnricherSpec |
headerFunction(String name,
java.util.function.Function<Message<P>,?> function,
Boolean overwrite)
Add a single header specification where the value is obtained by invoking the
Function callback. |
HeaderEnricherSpec |
headers(Map<String,Object> headers)
Add header specifications from the
Map ; if a map value is an
Expression , it will be evaluated at run time when the message headers are
enriched. |
HeaderEnricherSpec |
headers(Map<String,Object> headers,
Boolean overwrite)
Add header specifications from the
Map ; if a map value is an
Expression , it will be evaluated at run time when the message headers are
enriched. |
HeaderEnricherSpec |
headers(MapBuilder<?,String,Object> headers)
Add header specifications from the
MapBuilder ; if a map value is an
Expression , it will be evaluated at run time when the message headers are
enriched. |
HeaderEnricherSpec |
headers(MapBuilder<?,String,Object> headers,
Boolean overwrite)
Add header specifications from the
MapBuilder ; if a map value is an
Expression , it will be evaluated at run time when the message headers are
enriched. |
HeaderEnricherSpec |
messageProcessor(MessageProcessor<?> messageProcessor)
Configure an optional custom
MessageProcessor for the enricher. |
HeaderEnricherSpec |
messageProcessor(String expression)
Configure an
ExpressionEvaluatingMessageProcessor that evaluates to a
Map of additional headers. |
HeaderEnricherSpec |
messageProcessor(String beanName,
String methodName)
Configure an
MethodInvokingMessageProcessor that
invokes the method on the bean - the method must return a Map of headers. |
HeaderEnricherSpec |
priority(Number priority)
Add a
IntegrationMessageHeaderAccessor.PRIORITY header. |
HeaderEnricherSpec |
priority(Number priority,
Boolean overwrite)
Add a
IntegrationMessageHeaderAccessor.PRIORITY header. |
HeaderEnricherSpec |
priorityExpression(String priorityExpression)
Add a
IntegrationMessageHeaderAccessor.PRIORITY header
where the value is a SpEL Expression evaluation result. |
HeaderEnricherSpec |
priorityExpression(String priorityExpression,
Boolean overwrite)
Add a
IntegrationMessageHeaderAccessor.PRIORITY header
where the value is a SpEL Expression evaluation result. |
<P> HeaderEnricherSpec |
priorityFunction(java.util.function.Function<Message<P>,?> priorityFunction,
Boolean overwrite)
Add a
IntegrationMessageHeaderAccessor.PRIORITY header where the
value is obtained by invoking the Function callback. |
<P> HeaderEnricherSpec |
priorityFunction(java.util.function.Function<Message<P>,Object> priorityFunction)
Add a
IntegrationMessageHeaderAccessor.PRIORITY header where the
value is obtained by invoking the Function callback. |
HeaderEnricherSpec |
replyChannel(Object replyChannel)
Add a
MessageHeaders.REPLY_CHANNEL header: bean name or instance. |
HeaderEnricherSpec |
replyChannel(Object replyChannel,
Boolean overwrite)
Add a
MessageHeaders.REPLY_CHANNEL header: bean name or instance. |
HeaderEnricherSpec |
replyChannelExpression(String replyChannelExpression)
Add a
MessageHeaders.REPLY_CHANNEL header
where the value is a SpEL Expression evaluation result. |
HeaderEnricherSpec |
replyChannelExpression(String replyChannelExpression,
Boolean overwrite)
Add a
MessageHeaders.REPLY_CHANNEL header
where the value is a SpEL Expression evaluation result. |
<P> HeaderEnricherSpec |
replyChannelFunction(java.util.function.Function<Message<P>,?> replyChannelFunction,
Boolean overwrite)
Add a
MessageHeaders.REPLY_CHANNEL header where the
value is obtained by invoking the Function callback. |
<P> HeaderEnricherSpec |
replyChannelFunction(java.util.function.Function<Message<P>,Object> replyChannelFunction)
Add a
MessageHeaders.REPLY_CHANNEL header where the
value is obtained by invoking the Function callback. |
HeaderEnricherSpec |
routingSlip(Boolean overwrite,
Object... routingSlipPath)
Add a
IntegrationMessageHeaderAccessor.ROUTING_SLIP header. |
HeaderEnricherSpec |
routingSlip(Object... routingSlipPath)
Add a
IntegrationMessageHeaderAccessor.ROUTING_SLIP header. |
HeaderEnricherSpec |
shouldSkipNulls(boolean shouldSkipNulls) |
advice, async, autoStartup, customizeMonoReply, handleMessageAdvice, notPropagatedHeaders, order, phase, poller, requiresReply, role, sendTimeout, taskScheduler, transactional, transactional, transactional, transactional, transactional
assertHandler, getComponentsToRegister, id, obtainInputChannelFromFlow, obtainInputChannelFromFlow, poller, poller
_this, createInstance, destroyInstance, get, getId, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stop
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
protected final Map<String,HeaderValueMessageProcessor<?>> headerToAdd
protected final HeaderEnricher headerEnricher
public HeaderEnricherSpec defaultOverwrite(boolean defaultOverwrite)
defaultOverwrite
- the defaultOverwrite.HeaderEnricher.setDefaultOverwrite(boolean)
public HeaderEnricherSpec shouldSkipNulls(boolean shouldSkipNulls)
shouldSkipNulls
- the shouldSkipNulls.HeaderEnricher.setShouldSkipNulls(boolean)
public HeaderEnricherSpec messageProcessor(MessageProcessor<?> messageProcessor)
MessageProcessor
for the enricher. The
processor must return a Map
of header names and values. They will be added
to the inbound message headers before evaluating the individual configured header
specifications.messageProcessor
- the messageProcessor.HeaderEnricher.setMessageProcessor(MessageProcessor)
public HeaderEnricherSpec messageProcessor(String expression)
ExpressionEvaluatingMessageProcessor
that evaluates to a
Map
of additional headers. They will be added to the inbound message
headers before evaluating the individual configured header specifications.expression
- the expression.messageProcessor(MessageProcessor)
public HeaderEnricherSpec messageProcessor(String beanName, String methodName)
MethodInvokingMessageProcessor
that
invokes the method on the bean - the method must return a Map
of headers.
They will be added to the inbound message headers before evaluating the individual
configured header specifications.beanName
- The bean name.methodName
- The method name.messageProcessor(MessageProcessor)
public HeaderEnricherSpec headers(MapBuilder<?,String,Object> headers)
MapBuilder
; if a map value is an
Expression
, 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, unless
defaultOverwrite(boolean)
is true.headers
- the header map builder.public HeaderEnricherSpec headers(MapBuilder<?,String,Object> headers, Boolean overwrite)
MapBuilder
; if a map value is an
Expression
, it will be evaluated at run time when the message headers are
enriched. Otherwise the value is simply added to the headers.headers
- the header map builder.overwrite
- true to overwrite existing headers.public HeaderEnricherSpec headers(Map<String,Object> headers)
Map
; if a map value is an
Expression
, 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, unless
defaultOverwrite(boolean)
is true.headers
- The header builder.public HeaderEnricherSpec headers(Map<String,Object> headers, Boolean overwrite)
Map
; if a map value is an
Expression
, it will be evaluated at run time when the message headers are
enriched. Otherwise the value is simply added to the headers.headers
- The header builder.overwrite
- true to overwrite existing headers.public HeaderEnricherSpec headerExpressions(MapBuilder<?,String,String> headers)
MapBuilder
; the Map
values 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, unless defaultOverwrite(boolean)
is true.headers
- the header map builder.public HeaderEnricherSpec headerExpressions(MapBuilder<?,String,String> headers, Boolean overwrite)
MapBuilder
; the Map
values must
be String representations of SpEL expressions that will be evaluated at run time
when the message headers are enriched.headers
- the header map builder.overwrite
- true to overwrite existing headers.public HeaderEnricherSpec headerExpressions(java.util.function.Consumer<StringStringMapBuilder> configurer)
StringStringMapBuilder
; the Map
values 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, unless defaultOverwrite(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()")))
configurer
- the configurer.public HeaderEnricherSpec headerExpressions(java.util.function.Consumer<StringStringMapBuilder> configurer, Boolean overwrite)
StringStringMapBuilder
; the Map
values 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))
configurer
- the configurer.overwrite
- true to overwrite existing headers.public HeaderEnricherSpec headerExpressions(Map<String,String> headers)
Map
values 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,
unless defaultOverwrite(boolean)
is true.headers
- the headers.public HeaderEnricherSpec headerExpressions(Map<String,String> headers, Boolean overwrite)
Map
values must be String representations of
SpEL expressions that will be evaluated at run time when the message headers are
enriched.headers
- the headers.overwrite
- true to overwrite existing headers.public HeaderEnricherSpec correlationId(Object correlationId)
IntegrationMessageHeaderAccessor.CORRELATION_ID
header.
If the header exists, it will not be overwritten unless defaultOverwrite(boolean)
is true.correlationId
- the header value for IntegrationMessageHeaderAccessor.CORRELATION_ID
.public HeaderEnricherSpec correlationId(Object correlationId, Boolean overwrite)
IntegrationMessageHeaderAccessor.CORRELATION_ID
header.correlationId
- the header value for IntegrationMessageHeaderAccessor.CORRELATION_ID
.overwrite
- true to overwrite an existing header.public HeaderEnricherSpec correlationIdExpression(String correlationIdExpression)
IntegrationMessageHeaderAccessor.CORRELATION_ID
header
where the value is a SpEL Expression
evaluation result.
If the header exists, it will not be overwritten
unless defaultOverwrite(boolean)
is true.correlationIdExpression
- the expression for
IntegrationMessageHeaderAccessor.CORRELATION_ID
header.public HeaderEnricherSpec correlationIdExpression(String correlationIdExpression, Boolean overwrite)
IntegrationMessageHeaderAccessor.CORRELATION_ID
header
where the value is a SpEL Expression
evaluation result.correlationIdExpression
- the expression for
IntegrationMessageHeaderAccessor.CORRELATION_ID
header.overwrite
- true to overwrite an existing header.public <P> HeaderEnricherSpec correlationIdFunction(java.util.function.Function<Message<P>,Object> correlationIdFunction)
IntegrationMessageHeaderAccessor.CORRELATION_ID
header where the
value is obtained by invoking the Function
callback.
If the header exists, it will not be overwritten
unless defaultOverwrite(boolean)
is true.P
- the payload type.correlationIdFunction
- the function.FunctionExpression
public <P> HeaderEnricherSpec correlationIdFunction(java.util.function.Function<Message<P>,?> correlationIdFunction, Boolean overwrite)
IntegrationMessageHeaderAccessor.CORRELATION_ID
header where the
value is obtained by invoking the Function
callback.P
- the payload type.correlationIdFunction
- the function.overwrite
- true to overwrite an existing header.FunctionExpression
public HeaderEnricherSpec replyChannel(Object replyChannel)
MessageHeaders.REPLY_CHANNEL
header: bean name or instance.
If the header exists, it will not be overwritten unless defaultOverwrite(boolean)
is true.replyChannel
- the header value for MessageHeaders.REPLY_CHANNEL
.public HeaderEnricherSpec replyChannel(Object replyChannel, Boolean overwrite)
MessageHeaders.REPLY_CHANNEL
header: bean name or instance.replyChannel
- the header value for MessageHeaders.REPLY_CHANNEL
.overwrite
- true to overwrite an existing header.public HeaderEnricherSpec replyChannelExpression(String replyChannelExpression)
MessageHeaders.REPLY_CHANNEL
header
where the value is a SpEL Expression
evaluation result.
If the header exists, it will not be overwritten
unless defaultOverwrite(boolean)
is true.replyChannelExpression
- the expression for MessageHeaders.REPLY_CHANNEL
header.public HeaderEnricherSpec replyChannelExpression(String replyChannelExpression, Boolean overwrite)
MessageHeaders.REPLY_CHANNEL
header
where the value is a SpEL Expression
evaluation result.replyChannelExpression
- the expression for MessageHeaders.REPLY_CHANNEL
header.overwrite
- true to overwrite an existing header.public <P> HeaderEnricherSpec replyChannelFunction(java.util.function.Function<Message<P>,Object> replyChannelFunction)
MessageHeaders.REPLY_CHANNEL
header where the
value is obtained by invoking the Function
callback.
If the header exists, it will not be overwritten
unless defaultOverwrite(boolean)
is true.P
- the payload type.replyChannelFunction
- the function.FunctionExpression
public <P> HeaderEnricherSpec replyChannelFunction(java.util.function.Function<Message<P>,?> replyChannelFunction, Boolean overwrite)
MessageHeaders.REPLY_CHANNEL
header where the
value is obtained by invoking the Function
callback.P
- the payload type.replyChannelFunction
- the function.overwrite
- true to overwrite an existing header.FunctionExpression
public HeaderEnricherSpec errorChannel(Object errorChannel)
MessageHeaders.ERROR_CHANNEL
header: bean name or instance.
If the header exists, it will not be overwritten unless defaultOverwrite(boolean)
is true.errorChannel
- the header value for MessageHeaders.ERROR_CHANNEL
.public HeaderEnricherSpec errorChannel(Object errorChannel, Boolean overwrite)
MessageHeaders.ERROR_CHANNEL
header: bean name or instance.errorChannel
- the header value for MessageHeaders.ERROR_CHANNEL
.overwrite
- true to overwrite an existing header.public HeaderEnricherSpec errorChannelExpression(String errorChannelExpression)
MessageHeaders.ERROR_CHANNEL
header
where the value is a SpEL Expression
evaluation result.
If the header exists, it will not be overwritten
unless defaultOverwrite(boolean)
is true.errorChannelExpression
- the expression for MessageHeaders.ERROR_CHANNEL
header.public HeaderEnricherSpec errorChannelExpression(String errorChannelExpression, Boolean overwrite)
MessageHeaders.ERROR_CHANNEL
header
where the value is a SpEL Expression
evaluation result.errorChannelExpression
- the expression for MessageHeaders.ERROR_CHANNEL
header.overwrite
- true to overwrite an existing header.public <P> HeaderEnricherSpec errorChannelFunction(java.util.function.Function<Message<P>,Object> errorChannelFunction)
MessageHeaders.ERROR_CHANNEL
header where the
value is obtained by invoking the Function
callback.
If the header exists, it will not be overwritten
unless defaultOverwrite(boolean)
is true.P
- the payload type.errorChannelFunction
- the function.FunctionExpression
public <P> HeaderEnricherSpec errorChannelFunction(java.util.function.Function<Message<P>,?> errorChannelFunction, Boolean overwrite)
MessageHeaders.ERROR_CHANNEL
header where the
value is obtained by invoking the Function
callback.P
- the payload type.errorChannelFunction
- the function.overwrite
- true to overwrite an existing header.FunctionExpression
public HeaderEnricherSpec priority(Number priority)
IntegrationMessageHeaderAccessor.PRIORITY
header.
If the header exists, it will not be overwritten unless defaultOverwrite(boolean)
is true.priority
- the header value for IntegrationMessageHeaderAccessor.PRIORITY
.public HeaderEnricherSpec priority(Number priority, Boolean overwrite)
IntegrationMessageHeaderAccessor.PRIORITY
header.priority
- the header value for IntegrationMessageHeaderAccessor.PRIORITY
.overwrite
- true to overwrite an existing header.public HeaderEnricherSpec priorityExpression(String priorityExpression)
IntegrationMessageHeaderAccessor.PRIORITY
header
where the value is a SpEL Expression
evaluation result.
If the header exists, it will not be overwritten
unless defaultOverwrite(boolean)
is true.priorityExpression
- the expression for IntegrationMessageHeaderAccessor.PRIORITY
header.public HeaderEnricherSpec priorityExpression(String priorityExpression, Boolean overwrite)
IntegrationMessageHeaderAccessor.PRIORITY
header
where the value is a SpEL Expression
evaluation result.priorityExpression
- the expression for IntegrationMessageHeaderAccessor.PRIORITY
header.overwrite
- true to overwrite an existing header.public <P> HeaderEnricherSpec priorityFunction(java.util.function.Function<Message<P>,Object> priorityFunction)
IntegrationMessageHeaderAccessor.PRIORITY
header where the
value is obtained by invoking the Function
callback.
If the header exists, it will not be overwritten
unless defaultOverwrite(boolean)
is true.P
- the payload type.priorityFunction
- the function.FunctionExpression
public <P> HeaderEnricherSpec priorityFunction(java.util.function.Function<Message<P>,?> priorityFunction, Boolean overwrite)
IntegrationMessageHeaderAccessor.PRIORITY
header where the
value is obtained by invoking the Function
callback.P
- the payload type.priorityFunction
- the function.overwrite
- true to overwrite an existing header.FunctionExpression
public HeaderEnricherSpec expirationDate(Object expirationDate)
IntegrationMessageHeaderAccessor.EXPIRATION_DATE
header: Date
or long
.
If the header exists, it will not be overwritten unless defaultOverwrite(boolean)
is true.expirationDate
- the header value for IntegrationMessageHeaderAccessor.EXPIRATION_DATE
.public HeaderEnricherSpec expirationDate(Object expirationDate, Boolean overwrite)
IntegrationMessageHeaderAccessor.EXPIRATION_DATE
header.expirationDate
- the header value for IntegrationMessageHeaderAccessor.EXPIRATION_DATE
.overwrite
- true to overwrite an existing header.public HeaderEnricherSpec expirationDateExpression(String expirationDateExpression)
IntegrationMessageHeaderAccessor.EXPIRATION_DATE
header
where the value is a SpEL Expression
evaluation result.
If the header exists, it will not be overwritten
unless defaultOverwrite(boolean)
is true.expirationDateExpression
- the expression for IntegrationMessageHeaderAccessor.EXPIRATION_DATE
header.public HeaderEnricherSpec expirationDateExpression(String expirationDateExpression, Boolean overwrite)
IntegrationMessageHeaderAccessor.EXPIRATION_DATE
header
where the value is a SpEL Expression
evaluation result.expirationDateExpression
- the expression for
IntegrationMessageHeaderAccessor.EXPIRATION_DATE
header.overwrite
- true to overwrite an existing header.public <P> HeaderEnricherSpec expirationDateFunction(java.util.function.Function<Message<P>,Object> expirationDateFunction)
IntegrationMessageHeaderAccessor.EXPIRATION_DATE
header where the
value is obtained by invoking the Function
callback.
If the header exists, it will not be overwritten
unless defaultOverwrite(boolean)
is true.P
- the payload type.expirationDateFunction
- the function.FunctionExpression
public <P> HeaderEnricherSpec expirationDateFunction(java.util.function.Function<Message<P>,?> expirationDateFunction, Boolean overwrite)
IntegrationMessageHeaderAccessor.EXPIRATION_DATE
header where the
value is obtained by invoking the Function
callback.P
- the payload type.expirationDateFunction
- the function.overwrite
- true to overwrite an existing header.FunctionExpression
public HeaderEnricherSpec routingSlip(Object... routingSlipPath)
IntegrationMessageHeaderAccessor.ROUTING_SLIP
header.
The possible values are:
MessageChannel
instance.
MessageChannel
bean name.
RoutingSlipRouteStrategy
instance.
RoutingSlipRouteStrategy
bean name.
String
for SpEL expression which has to be evaluated to the
MessageChannel
or
RoutingSlipRouteStrategy
.
defaultOverwrite(boolean)
is true.routingSlipPath
- the header value for IntegrationMessageHeaderAccessor.ROUTING_SLIP
.public HeaderEnricherSpec routingSlip(Boolean overwrite, Object... routingSlipPath)
IntegrationMessageHeaderAccessor.ROUTING_SLIP
header.
The possible values are:
MessageChannel
instance.
MessageChannel
bean name.
RoutingSlipRouteStrategy
instance.
RoutingSlipRouteStrategy
bean name.
String
for SpEL expression which has to be evaluated to the
MessageChannel
or
RoutingSlipRouteStrategy
.
overwrite
- true to overwrite an existing header.routingSlipPath
- the header value for IntegrationMessageHeaderAccessor.ROUTING_SLIP
.public <V> HeaderEnricherSpec header(String name, V value)
defaultOverwrite(boolean)
is true.V
- the value type.name
- the header name.value
- the header value (not an Expression
).public <V> HeaderEnricherSpec header(String name, V value, Boolean overwrite)
V
- the value type.name
- the header name.value
- the header value (not an Expression
).overwrite
- true to overwrite an existing header.public HeaderEnricherSpec headerExpression(String name, String expression)
Expression
. If the header exists, it will not be overwritten
unless defaultOverwrite(boolean)
is true.name
- the header name.expression
- the expression.public HeaderEnricherSpec headerExpression(String name, String expression, Boolean overwrite)
Expression
.name
- the header name.expression
- the expression.overwrite
- true to overwrite an existing header.public <P> HeaderEnricherSpec headerFunction(String name, java.util.function.Function<Message<P>,?> function)
Function
callback. If the header exists, it will not be overwritten
unless defaultOverwrite(boolean)
is true.P
- the payload type.name
- the header name.function
- the function.FunctionExpression
public <P> HeaderEnricherSpec headerFunction(String name, java.util.function.Function<Message<P>,?> function, Boolean overwrite)
Function
callback.P
- the payload type.name
- the header name.function
- the function.overwrite
- true to overwrite an existing header.FunctionExpression
public <V> HeaderEnricherSpec header(String headerName, HeaderValueMessageProcessor<V> headerValueMessageProcessor)
HeaderValueMessageProcessor
.V
- the value type.headerName
- the header name.headerValueMessageProcessor
- the message processor.public HeaderEnricherSpec headerChannelsToString()
HeaderChannelRegistry
public HeaderEnricherSpec headerChannelsToString(String timeToLiveExpression)
timeToLiveExpression
- the minimum time that the mapping will remain in the registry.HeaderChannelRegistry
protected reactor.util.function.Tuple2<ConsumerEndpointFactoryBean,MessageTransformingHandler> doGet()
doGet
in class ConsumerEndpointSpec<HeaderEnricherSpec,MessageTransformingHandler>