Class MessageProducerSpec<S extends MessageProducerSpec<S,P>,P extends MessageProducerSupport>
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
org.springframework.integration.dsl.IntegrationComponentSpec<S,P>
org.springframework.integration.dsl.MessageProducerSpec<S,P>
- Type Parameters:
S
- the targetMessageProducerSpec
implementation type.P
- the targetMessageProducerSupport
implementation type.
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanClassLoaderAware
,org.springframework.beans.factory.BeanFactoryAware
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.FactoryBean<P>
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.Lifecycle
,org.springframework.context.Phased
,org.springframework.context.SmartLifecycle
public abstract class MessageProducerSpec<S extends MessageProducerSpec<S,P>,P extends MessageProducerSupport> extends IntegrationComponentSpec<S,P>
An
IntegrationComponentSpec
for
MessageProducer
s.- Since:
- 5.0
-
Field Summary
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
PARSER, target
-
Constructor Summary
Constructors Constructor Description MessageProducerSpec(P producer)
-
Method Summary
Modifier and Type Method Description S
autoStartup(boolean autoStartup)
S
errorChannel(java.lang.String errorChannel)
Configure the bean name of theMessageChannel
to which error messages will be sent.S
errorChannel(org.springframework.messaging.MessageChannel errorChannel)
Configure theMessageChannel
to which error messages will be sent.S
errorMessageStrategy(ErrorMessageStrategy errorMessageStrategy)
Set anErrorMessageStrategy
to use to build an error message when a exception occurs.S
id(java.lang.String id)
Configure the component identifier.S
outputChannel(java.lang.String outputChannel)
Specify the bean name of theoutputChannel
for theMessageProducer
.S
outputChannel(org.springframework.messaging.MessageChannel outputChannel)
Specify theoutputChannel
for theMessageProducer
.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.Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stop
-
Constructor Details
-
Method Details
-
id
Configure the component identifier. Used as thebeanName
to register the bean in the application context for this component. Configure the message producer's bean name.- Overrides:
id
in classIntegrationComponentSpec<S extends MessageProducerSpec<S,P>,P extends MessageProducerSupport>
- Parameters:
id
- the id.- Returns:
- the spec.
-
phase
- Parameters:
phase
- the phase.- Returns:
- the spec.
- See Also:
SmartLifecycle
-
autoStartup
- Parameters:
autoStartup
- the autoStartup.- Returns:
- the spec.
- See Also:
SmartLifecycle
-
outputChannel
Specify theoutputChannel
for theMessageProducer
.- Parameters:
outputChannel
- the outputChannel.- Returns:
- the spec.
- See Also:
MessageProducerSupport.setOutputChannel(MessageChannel)
-
outputChannel
Specify the bean name of theoutputChannel
for theMessageProducer
.- Parameters:
outputChannel
- the outputChannel bean name.- Returns:
- the spec.
- See Also:
MessageProducerSupport.setOutputChannelName(String)
-
errorChannel
Configure theMessageChannel
to which error messages will be sent.- Parameters:
errorChannel
- the errorChannel.- Returns:
- the spec.
- See Also:
MessageProducerSupport.setErrorChannel(MessageChannel)
-
errorChannel
Configure the bean name of theMessageChannel
to which error messages will be sent.- Parameters:
errorChannel
- the errorChannel bean name.- Returns:
- the spec.
- See Also:
MessageProducerSupport.setErrorChannelName(String)
-
sendTimeout
Configure the default timeout value to use for send operations. May be overridden for individual messages.- Parameters:
sendTimeout
- the send timeout in milliseconds- Returns:
- the spec.
- Since:
- 5.0.2
- See Also:
MessageProducerSupport.setSendTimeout(long)
-
shouldTrack
Whether component should be tracked or not by message history.- Parameters:
shouldTrack
- the tracking flag- Returns:
- the spec.
- Since:
- 5.0.2
- See Also:
MessageProducerSupport.setShouldTrack(boolean)
-
errorMessageStrategy
Set anErrorMessageStrategy
to use to build an error message when a exception occurs.- Parameters:
errorMessageStrategy
- theErrorMessageStrategy
.- Returns:
- the spec.
- Since:
- 5.0.2
- See Also:
MessageProducerSupport.setErrorMessageStrategy(ErrorMessageStrategy)
-