public abstract class AbstractMessageProducingHandler extends AbstractMessageHandler implements MessageProducer
AbstractMessageHandler implementation for the MessageProducer.| Modifier and Type | Field and Description |
|---|---|
protected MessagingTemplate |
messagingTemplate |
EXPRESSION_PARSER, loggerHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description |
|---|
AbstractMessageProducingHandler() |
| Modifier and Type | Method and Description |
|---|---|
MessageChannel |
getOutputChannel() |
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
protected void |
produceOutput(Object reply,
Message<?> requestMessage) |
protected void |
sendOutputs(Object result,
Message<?> requestMessage) |
protected void |
setAsyncReplySupported(boolean asyncReplySupported)
Allow async replies.
|
void |
setOutputChannel(MessageChannel outputChannel)
Specify the MessageChannel to which produced Messages should be sent.
|
void |
setOutputChannelName(String outputChannelName) |
void |
setSendTimeout(long sendTimeout)
Set the timeout for sending reply Messages.
|
protected boolean |
shouldCopyRequestHeaders()
Subclasses may override this.
|
protected boolean |
shouldSplitOutput(Iterable<?> reply) |
configureMetrics, getActiveCount, getActiveCountLong, getComponentType, getDuration, getErrorCount, getErrorCountLong, getHandleCount, getHandleCountLong, getManagedName, getManagedType, getMaxDuration, getMeanDuration, getMinDuration, getOrder, getStandardDeviationDuration, handleMessage, handleMessageInternal, isCountsEnabled, isLoggingEnabled, isStatsEnabled, reset, setCountsEnabled, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, setStatsEnabledafterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetComponentNameprotected final MessagingTemplate messagingTemplate
public void setSendTimeout(long sendTimeout)
sendTimeout - The send timeout.public void setOutputChannel(MessageChannel outputChannel)
MessageProducersetOutputChannel in interface MessageProduceroutputChannel - The output channel.public void setOutputChannelName(String outputChannelName)
protected void setAsyncReplySupported(boolean asyncReplySupported)
ListenableFuture send
the output when it is satisfied rather than sending the future as the result.
Only subclasses that support this feature should set it.asyncReplySupported - true to allow.protected void onInit()
throws Exception
IntegrationObjectSupportonInit in class AbstractMessageHandlerException - Any exception.public MessageChannel getOutputChannel()
protected boolean shouldSplitOutput(Iterable<?> reply)
protected boolean shouldCopyRequestHeaders()