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.PARSER, target
logger
DEFAULT_PHASE
OBJECT_TYPE_ATTRIBUTE
Constructor and Description |
---|
MessageProducerSpec(P producer) |
Modifier and Type | Method and Description |
---|---|
S |
autoStartup(boolean autoStartup) |
S |
errorChannel(MessageChannel errorChannel)
Configure the
MessageChannel to which error messages will be sent. |
S |
errorChannel(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(String id)
Configure the component identifier.
|
S |
outputChannel(MessageChannel outputChannel)
Specify the
outputChannel for the
MessageProducer |
S |
outputChannel(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, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stop
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
public MessageProducerSpec(P producer)
public S id(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(MessageChannel outputChannel)
outputChannel
for the
MessageProducer
outputChannel
- the outputChannel.MessageProducerSupport.setOutputChannel(MessageChannel)
public S outputChannel(String outputChannel)
outputChannel
for the
MessageProducer
outputChannel
- the outputChannel bean name.MessageProducerSupport.setOutputChannelName(String)
public S errorChannel(MessageChannel errorChannel)
MessageChannel
to which error messages will be sent.errorChannel
- the errorChannel.MessageProducerSupport.setErrorChannel(MessageChannel)
public S errorChannel(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)