S
- the target MessageProducerSpec
implementation type.P
- the target MessageProducerSupport
implementation type.public abstract class MessageProducerSpec<S extends MessageProducerSpec<S,P>,P extends MessageProducerSupport> extends IntegrationComponentSpec<S,P>
IntegrationComponentSpec
for
MessageProducer
s.logger, PARSER, target
Constructor and Description |
---|
MessageProducerSpec(P producer) |
Modifier and Type | Method and Description |
---|---|
S |
autoStartup(boolean autoStartup) |
S |
errorChannel(org.springframework.messaging.MessageChannel errorChannel)
Configure the
MessageChannel to which error messages will be sent. |
S |
errorChannel(java.lang.String errorChannel)
Configure the bean name of the
MessageChannel to which error messages will be sent. |
S |
errorMessageStrategy(ErrorMessageStrategy errorMessageStrategy)
Set an
ErrorMessageStrategy to use to build an error message when a exception occurs. |
S |
id(java.lang.String id)
Configure the component identifier.
|
S |
outputChannel(org.springframework.messaging.MessageChannel outputChannel)
Specify the
outputChannel for the
MessageProducer |
S |
outputChannel(java.lang.String outputChannel)
Specify the bean name of the
outputChannel for the
MessageProducer |
S |
phase(int phase) |
S |
sendTimeout(long sendTimeout)
Configure the default timeout value to use for send operations.
|
S |
shouldTrack(boolean shouldTrack)
Whether component should be tracked or not by message history.
|
_this, afterPropertiesSet, destroy, doGet, get, getId, getObject, getObjectType, isSingleton
public MessageProducerSpec(P producer)
public S id(java.lang.String id)
beanName
to register the
bean in the application context for this component.
Configure the message producer's bean name.id
in class IntegrationComponentSpec<S extends MessageProducerSpec<S,P>,P extends MessageProducerSupport>
id
- the id.public S phase(int phase)
phase
- the phase.SmartLifecycle
public S autoStartup(boolean autoStartup)
autoStartup
- the autoStartup.SmartLifecycle
public S outputChannel(org.springframework.messaging.MessageChannel outputChannel)
outputChannel
for the
MessageProducer
outputChannel
- the outputChannel.MessageProducerSupport.setOutputChannel(MessageChannel)
public S outputChannel(java.lang.String outputChannel)
outputChannel
for the
MessageProducer
outputChannel
- the outputChannel bean name.MessageProducerSupport.setOutputChannelName(String)
public S errorChannel(org.springframework.messaging.MessageChannel errorChannel)
MessageChannel
to which error messages will be sent.errorChannel
- the errorChannel.MessageProducerSupport.setErrorChannel(MessageChannel)
public S errorChannel(java.lang.String errorChannel)
MessageChannel
to which error messages will be sent.errorChannel
- the errorChannel bean name.MessageProducerSupport.setErrorChannelName(String)
public S sendTimeout(long sendTimeout)
sendTimeout
- the send timeout in millisecondsMessageProducerSupport.setSendTimeout(long)
public S shouldTrack(boolean shouldTrack)
shouldTrack
- the tracking flagMessageProducerSupport.setShouldTrack(boolean)
public S errorMessageStrategy(ErrorMessageStrategy errorMessageStrategy)
ErrorMessageStrategy
to use to build an error message when a exception occurs.errorMessageStrategy
- the ErrorMessageStrategy
.MessageProducerSupport.setErrorMessageStrategy(ErrorMessageStrategy)