Class MessagingGatewaySpec<S extends MessagingGatewaySpec<S,G>,G extends MessagingGatewaySupport>
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
org.springframework.integration.dsl.IntegrationComponentSpec<S,G>
org.springframework.integration.dsl.MessagingGatewaySpec<S,G>
- Type Parameters:
S
- the targetMessagingGatewaySpec
implementation type.G
- the targetMessagingGatewaySupport
implementation type.
- All Implemented Interfaces:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
,DisposableBean
,FactoryBean<G>
,InitializingBean
,Lifecycle
,Phased
,SmartLifecycle
- Direct Known Subclasses:
AmqpBaseInboundGatewaySpec
,BaseWsInboundGatewaySpec
,HttpInboundEndpointSupportSpec
,JmsInboundGatewaySpec
,KafkaInboundGatewaySpec
,RSocketInboundGatewaySpec
,TcpInboundGatewaySpec
public abstract class MessagingGatewaySpec<S extends MessagingGatewaySpec<S,G>,G extends MessagingGatewaySupport> extends IntegrationComponentSpec<S,G>
- Since:
- 5.0
- Author:
- Artem Bilan
-
Field Summary
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
PARSER, target
-
Constructor Summary
Constructors Constructor Description MessagingGatewaySpec(G gateway)
-
Method Summary
Modifier and Type Method Description S
autoStartup(boolean autoStartup)
An auto-startup flag.S
errorChannel(String errorChannelName)
An error channel name to use.S
errorChannel(MessageChannel errorChannel)
An error channel to use.S
errorOnTimeout(boolean errorOnTimeout)
If errorOnTimeout is true, construct an instance that will send anErrorMessage
with aMessageTimeoutException
payload to the error channel if a reply is expected but none is received.S
id(String id)
Configure the component identifier.S
phase(int phase)
A lifecycle phase to use.S
replyChannel(String replyChannelName)
A reply channel name to use.S
replyChannel(MessageChannel replyChannel)
A reply channel to use.S
replyMapper(OutboundMessageMapper<?> replyMapper)
AnOutboundMessageMapper
to use.S
replyTimeout(long replyTimeout)
A reply timeout to use.S
requestChannel(String requestChannelName)
A request channel name to use.S
requestChannel(MessageChannel requestChannel)
A request channel to use.S
requestMapper(InboundMessageMapper<?> requestMapper)
AnInboundMessageMapper
to use.S
requestTimeout(long requestTimeout)
A request timeout to use.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
Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Constructor Details
-
Method Details
-
id
Description copied from class:IntegrationComponentSpec
Configure the component identifier. Used as thebeanName
to register the bean in the application context for this component.- Overrides:
id
in classIntegrationComponentSpec<S extends MessagingGatewaySpec<S,G>,G extends MessagingGatewaySupport>
- Parameters:
id
- the id.- Returns:
- the spec.
-
phase
A lifecycle phase to use.- Parameters:
phase
- the phase.- Returns:
- the spec.
- See Also:
SmartLifecycle
-
autoStartup
An auto-startup flag.- Parameters:
autoStartup
- the autoStartup.- Returns:
- the spec.
- See Also:
SmartLifecycle
-
replyChannel
A reply channel to use.- Parameters:
replyChannel
- the replyChannel.- Returns:
- the spec.
- See Also:
MessagingGatewaySupport.setReplyChannel(MessageChannel)
-
replyChannel
A reply channel name to use.- Parameters:
replyChannelName
- the name of replyChannel.- Returns:
- the spec.
- See Also:
MessagingGatewaySupport.setReplyChannelName(String)
-
requestChannel
A request channel to use.- Parameters:
requestChannel
- the requestChannel.- Returns:
- the spec.
- See Also:
MessagingGatewaySupport.setRequestChannel(MessageChannel)
-
requestChannel
A request channel name to use.- Parameters:
requestChannelName
- the name of requestChannel.- Returns:
- the spec.
- See Also:
MessagingGatewaySupport.setRequestChannelName(String)
-
errorChannel
An error channel to use.- Parameters:
errorChannel
- the errorChannel.- Returns:
- the spec.
- See Also:
MessagingGatewaySupport.setErrorChannel(MessageChannel)
-
errorChannel
An error channel name to use.- Parameters:
errorChannelName
- the name of errorChannel.- Returns:
- the spec.
- See Also:
MessagingGatewaySupport.setErrorChannelName(String)
-
requestTimeout
A request timeout to use.- Parameters:
requestTimeout
- the requestTimeout.- Returns:
- the spec.
- See Also:
MessagingGatewaySupport.setRequestTimeout(long)
-
replyTimeout
A reply timeout to use.- Parameters:
replyTimeout
- the replyTimeout.- Returns:
- the spec.
- See Also:
MessagingGatewaySupport.setReplyTimeout(long)
-
errorOnTimeout
If errorOnTimeout is true, construct an instance that will send anErrorMessage
with aMessageTimeoutException
payload to the error channel if a reply is expected but none is received. If no error channel is configured, theMessageTimeoutException
will be thrown.- Parameters:
errorOnTimeout
- true to create the error message on reply timeout.- Returns:
- the spec
- Since:
- 5.2.2
- See Also:
MessagingGatewaySupport.setErrorOnTimeout(boolean)
-
requestMapper
AnInboundMessageMapper
to use.- Parameters:
requestMapper
- the requestMapper.- Returns:
- the spec.
- See Also:
MessagingGatewaySupport.setRequestMapper(InboundMessageMapper)
-
replyMapper
AnOutboundMessageMapper
to use.- Parameters:
replyMapper
- the replyMapper.- Returns:
- the spec.
- See Also:
MessagingGatewaySupport.setReplyMapper(OutboundMessageMapper)
-
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:
MessagingGatewaySupport.setShouldTrack(boolean)
-