public class MessageTransformingHandler extends AbstractReplyProducingMessageHandler implements org.springframework.context.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_NAME| Constructor and Description |
|---|
MessageTransformingHandler(Transformer transformer)
Create a
MessageTransformingHandler instance that delegates to
the provided Transformer. |
| Modifier and Type | Method and Description |
|---|---|
void |
addNotPropagatedHeaders(java.lang.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() |
java.lang.String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
protected java.lang.Object |
handleRequestMessage(org.springframework.messaging.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, getRequiresReply, handleMessageInternal, hasAdviceChain, onInit, setAdviceChain, setBeanClassLoader, setRequiresReplycreateOutputMessage, getNotPropagatedHeaders, getOutputChannel, isAsync, produceOutput, resolveErrorChannel, sendErrorMessage, sendOutput, sendOutputs, setAsync, setNotPropagatedHeaders, setOutputChannel, setOutputChannelName, setSendTimeout, shouldSplitOutput, updateNotPropagatedHeadersconfigureMetrics, getActiveCount, getActiveCountLong, getDuration, getErrorCount, getErrorCountLong, getHandleCount, getHandleCountLong, getManagedName, getManagedType, getMaxDuration, getMeanDuration, getMinDuration, getOrder, getOverrides, getStandardDeviationDuration, handleMessage, isCountsEnabled, isLoggingEnabled, isStatsEnabled, onComplete, onError, onNext, onSubscribe, registerMetricsCaptor, reset, setCountsEnabled, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, setStatsEnabledafterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, 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, waitgetComponentNamepublic MessageTransformingHandler(Transformer transformer)
MessageTransformingHandler instance that delegates to
the provided Transformer.transformer - The transformer.public java.lang.String getComponentType()
IntegrationObjectSupportgetComponentType in interface NamedComponentgetComponentType in class AbstractMessageHandlerpublic void addNotPropagatedHeaders(java.lang.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 AbstractReplyProducingMessageHandlerpublic void start()
start in interface org.springframework.context.Lifecyclepublic void stop()
stop in interface org.springframework.context.Lifecyclepublic boolean isRunning()
isRunning in interface org.springframework.context.Lifecycleprotected java.lang.Object handleRequestMessage(org.springframework.messaging.Message<?> message)
AbstractReplyProducingMessageHandlerhandleRequestMessage in class AbstractReplyProducingMessageHandlermessage - The request message.null.protected boolean shouldCopyRequestHeaders()
AbstractMessageProducingHandlershouldCopyRequestHeaders in class AbstractMessageProducingHandler