public class ContentEnricher extends AbstractReplyProducingMessageHandler implements org.springframework.context.Lifecycle, IntegrationEvaluationContextAware
AbstractReplyProducingMessageHandler.RequestHandler
logger
Constructor and Description |
---|
ContentEnricher() |
Modifier and Type | Method and Description |
---|---|
protected void |
doInit()
Initializes the Content Enricher.
|
protected java.lang.Object |
handleRequestMessage(Message<?> requestMessage)
Subclasses must implement this method to handle the request Message.
|
boolean |
isRunning()
Lifecycle implementation.
|
void |
setHeaderExpressions(java.util.Map<java.lang.String,HeaderValueMessageProcessor<?>> headerExpressions)
Provide the map of
HeaderValueMessageProcessor to evaluate when enriching
the target MessageHeaders. |
void |
setIntegrationEvaluationContext(org.springframework.expression.EvaluationContext evaluationContext) |
void |
setPropertyExpressions(java.util.Map<java.lang.String,org.springframework.expression.Expression> propertyExpressions)
Provide the map of expressions to evaluate when enriching the target payload.
|
void |
setReplyChannel(MessageChannel replyChannel)
Sets the content enricher's reply channel.
|
void |
setReplyTimeout(java.lang.Long replyTimeout)
Set the timeout value for receiving reply messages.
|
void |
setRequestChannel(MessageChannel requestChannel)
Sets the content enricher's request channel.
|
void |
setRequestPayloadExpression(org.springframework.expression.Expression requestPayloadExpression)
By default the original message's payload will be used as the actual payload
that will be send to the request-channel.
|
void |
setRequestTimeout(java.lang.Long requestTimeout)
Set the timeout value for sending request messages.
|
void |
setShouldClonePayload(boolean shouldClonePayload)
Specify whether to clone payload objects to create the target object.
|
void |
start()
Lifecycle implementation.
|
void |
stop()
Lifecycle implementation.
|
doInvokeAdvisedRequestHandler, getMessagingTemplate, handleMessageInternal, hasAdviceChain, onInit, setAdviceChain, setBeanClassLoader, setChannelResolver, setOutputChannel, setRequiresReply, setSendTimeout, shouldCopyRequestHeaders
getComponentType, getOrder, handleMessage, setOrder, setShouldTrack
afterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getComponentName
public void setPropertyExpressions(java.util.Map<java.lang.String,org.springframework.expression.Expression> propertyExpressions)
public void setHeaderExpressions(java.util.Map<java.lang.String,HeaderValueMessageProcessor<?>> headerExpressions)
HeaderValueMessageProcessor
to evaluate when enriching
the target MessageHeaders.
The keys should simply be header names, and the values should be Expressions
that will evaluate against the reply Message as the root object.public void setRequestChannel(MessageChannel requestChannel)
public void setReplyChannel(MessageChannel replyChannel)
public void setRequestTimeout(java.lang.Long requestTimeout)
requestTimeout
- the timeout value in milliseconds. Must not be null.public void setReplyTimeout(java.lang.Long replyTimeout)
replyTimeout
- the timeout value in milliseconds. Must not be null.public void setRequestPayloadExpression(org.springframework.expression.Expression requestPayloadExpression)
public void setShouldClonePayload(boolean shouldClonePayload)
public void setIntegrationEvaluationContext(org.springframework.expression.EvaluationContext evaluationContext)
setIntegrationEvaluationContext
in interface IntegrationEvaluationContextAware
protected void doInit()
doInit
in class AbstractReplyProducingMessageHandler
protected java.lang.Object handleRequestMessage(Message<?> requestMessage)
AbstractReplyProducingMessageHandler
handleRequestMessage
in class AbstractReplyProducingMessageHandler
public void start()
start
in interface org.springframework.context.Lifecycle
public void stop()
stop
in interface org.springframework.context.Lifecycle
public boolean isRunning()
isRunning
in interface org.springframework.context.Lifecycle