public abstract class AbstractMessageProducingHandler extends AbstractMessageHandler implements MessageProducer
AbstractMessageHandler
implementation for the MessageProducer
.Modifier and Type | Field and Description |
---|---|
protected MessagingTemplate |
messagingTemplate |
logger
Constructor and Description |
---|
AbstractMessageProducingHandler() |
Modifier and Type | Method and Description |
---|---|
org.springframework.messaging.MessageChannel |
getOutputChannel() |
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
protected void |
produceOutput(java.lang.Object reply,
org.springframework.messaging.Message<?> requestMessage) |
protected void |
sendOutputs(java.lang.Object result,
org.springframework.messaging.Message<?> requestMessage) |
void |
setOutputChannel(org.springframework.messaging.MessageChannel outputChannel)
Specify the MessageChannel to which produced Messages should be sent.
|
void |
setOutputChannelName(java.lang.String outputChannelName) |
void |
setSendTimeout(long sendTimeout)
Set the timeout for sending reply Messages.
|
protected boolean |
shouldCopyRequestHeaders()
Subclasses may override this.
|
protected boolean |
shouldSplitOutput(java.lang.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, setStatsEnabled
afterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setTaskScheduler, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getComponentName
protected final MessagingTemplate messagingTemplate
public void setSendTimeout(long sendTimeout)
sendTimeout
- The send timeout.public void setOutputChannel(org.springframework.messaging.MessageChannel outputChannel)
MessageProducer
setOutputChannel
in interface MessageProducer
outputChannel
- The output channel.public void setOutputChannelName(java.lang.String outputChannelName)
protected void onInit() throws java.lang.Exception
IntegrationObjectSupport
onInit
in class AbstractMessageHandler
java.lang.Exception
- Any exception.public org.springframework.messaging.MessageChannel getOutputChannel()
protected void sendOutputs(java.lang.Object result, org.springframework.messaging.Message<?> requestMessage)
protected boolean shouldSplitOutput(java.lang.Iterable<?> reply)
protected void produceOutput(java.lang.Object reply, org.springframework.messaging.Message<?> requestMessage)
protected boolean shouldCopyRequestHeaders()