public class MessageTransformingHandler extends AbstractReplyProducingMessageHandler implements Lifecycle
MessageHandler
that delegates to a
Transformer instance to modify the received Message
and sends the result to its output channel.AbstractReplyProducingMessageHandler.RequestHandlerIntegrationManagement.ManagementOverridesmessagingTemplateEXPRESSION_PARSER, loggerMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAMEHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description |
|---|
MessageTransformingHandler(Transformer transformer)
Create a
MessageTransformingHandler instance that delegates to
the provided Transformer. |
| Modifier and Type | Method and Description |
|---|---|
void |
addNotPropagatedHeaders(String... headers)
Add header patterns ("xxx*", "*xxx", "*xxx*" or "xxx*yyy")
that will NOT be copied from the inbound message if
AbstractMessageProducingHandler.shouldCopyRequestHeaders() is true, instead of overwriting the existing
set. |
protected void |
doInit() |
String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
protected Object |
handleRequestMessage(Message<?> message)
Subclasses must implement this method to handle the request Message.
|
boolean |
isRunning() |
protected boolean |
shouldCopyRequestHeaders()
Subclasses may override this.
|
void |
start() |
void |
stop() |
doInvokeAdvisedRequestHandler, getBeanClassLoader, getRequiresReply, handleMessageInternal, hasAdviceChain, onInit, setAdviceChain, setBeanClassLoader, setRequiresReplycreateOutputMessage, getNotPropagatedHeaders, getOutputChannel, isAsync, messageBuilderForReply, produceOutput, resolveErrorChannel, sendErrorMessage, sendOutput, sendOutputs, setAsync, setNotPropagatedHeaders, setOutputChannel, setOutputChannelName, setSendTimeout, shouldSplitOutput, updateNotPropagatedHeadersconfigureMetrics, destroy, getActiveCount, getActiveCountLong, getDuration, getErrorCount, getErrorCountLong, getHandleCount, getHandleCountLong, getManagedName, getManagedType, getMaxDuration, getMeanDuration, getMetricsCaptor, getMinDuration, getOrder, getOverrides, getStandardDeviationDuration, handleMessage, isCountsEnabled, isLoggingEnabled, isStatsEnabled, onComplete, onError, onNext, onSubscribe, registerMetricsCaptor, reset, setCountsEnabled, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, setStatsEnabledafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waiterrorCount, handleCountgetBeanName, getComponentNamepublic MessageTransformingHandler(Transformer transformer)
MessageTransformingHandler instance that delegates to
the provided Transformer.transformer - The transformer.public String getComponentType()
IntegrationObjectSupportgetComponentType in interface NamedComponentgetComponentType in class AbstractMessageHandlerpublic void addNotPropagatedHeaders(String... headers)
AbstractMessageProducingHandlerAbstractMessageProducingHandler.shouldCopyRequestHeaders() is true, instead of overwriting the existing
set.addNotPropagatedHeaders in interface HeaderPropagationAwareaddNotPropagatedHeaders in class AbstractMessageProducingHandlerheaders - the headers to not propagate from the inbound message.AbstractMessageProducingHandler.setNotPropagatedHeaders(String...)protected void doInit()
doInit in class AbstractReplyProducingMessageHandlerprotected Object handleRequestMessage(Message<?> message)
AbstractReplyProducingMessageHandlerhandleRequestMessage in class AbstractReplyProducingMessageHandlermessage - The request message.null.protected boolean shouldCopyRequestHeaders()
AbstractMessageProducingHandlershouldCopyRequestHeaders in class AbstractMessageProducingHandler