S
- the target MessagingGatewaySpec
implementation type.G
- the target MessagingGatewaySupport
implementation type.public abstract class MessagingGatewaySpec<S extends MessagingGatewaySpec<S,G>,G extends MessagingGatewaySupport> extends IntegrationComponentSpec<S,G>
PARSER, target
logger
DEFAULT_PHASE
OBJECT_TYPE_ATTRIBUTE
Constructor and Description |
---|
MessagingGatewaySpec(G gateway) |
Modifier and Type | Method and Description |
---|---|
S |
autoStartup(boolean autoStartup)
An auto-startup flag.
|
S |
errorChannel(MessageChannel errorChannel)
An error channel to use.
|
S |
errorChannel(String errorChannelName)
An error channel name to use.
|
S |
errorOnTimeout(boolean errorOnTimeout)
If errorOnTimeout is true, construct an instance that will send an
ErrorMessage with a
MessageTimeoutException 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(MessageChannel replyChannel)
A reply channel to use.
|
S |
replyChannel(String replyChannelName)
A reply channel name to use.
|
S |
replyMapper(OutboundMessageMapper<?> replyMapper)
An
OutboundMessageMapper to use. |
S |
replyTimeout(long replyTimeout)
A reply timeout to use.
|
S |
requestChannel(MessageChannel requestChannel)
A request channel to use.
|
S |
requestChannel(String requestChannelName)
A request channel name to use.
|
S |
requestMapper(InboundMessageMapper<?> requestMapper)
An
InboundMessageMapper 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.
|
_this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stop
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
public MessagingGatewaySpec(G gateway)
public S id(String id)
IntegrationComponentSpec
beanName
to register the
bean in the application context for this component.id
in class IntegrationComponentSpec<S extends MessagingGatewaySpec<S,G>,G extends MessagingGatewaySupport>
id
- the id.public S phase(int phase)
phase
- the phase.SmartLifecycle
public S autoStartup(boolean autoStartup)
autoStartup
- the autoStartup.SmartLifecycle
public S replyChannel(MessageChannel replyChannel)
replyChannel
- the replyChannel.MessagingGatewaySupport.setReplyChannel(MessageChannel)
public S replyChannel(String replyChannelName)
replyChannelName
- the name of replyChannel.MessagingGatewaySupport.setReplyChannelName(String)
public S requestChannel(MessageChannel requestChannel)
requestChannel
- the requestChannel.MessagingGatewaySupport.setRequestChannel(MessageChannel)
public S requestChannel(String requestChannelName)
requestChannelName
- the name of requestChannel.MessagingGatewaySupport.setRequestChannelName(String)
public S errorChannel(MessageChannel errorChannel)
errorChannel
- the errorChannel.MessagingGatewaySupport.setErrorChannel(MessageChannel)
public S errorChannel(String errorChannelName)
errorChannelName
- the name of errorChannel.MessagingGatewaySupport.setErrorChannelName(String)
public S requestTimeout(long requestTimeout)
requestTimeout
- the requestTimeout.MessagingGatewaySupport.setRequestTimeout(long)
public S replyTimeout(long replyTimeout)
replyTimeout
- the replyTimeout.MessagingGatewaySupport.setReplyTimeout(long)
public S errorOnTimeout(boolean errorOnTimeout)
ErrorMessage
with a
MessageTimeoutException
payload to the error channel
if a reply is expected but none is received. If no error channel is configured,
the MessageTimeoutException
will be thrown.errorOnTimeout
- true to create the error message on reply timeout.MessagingGatewaySupport.setErrorOnTimeout(boolean)
public S requestMapper(InboundMessageMapper<?> requestMapper)
InboundMessageMapper
to use.requestMapper
- the requestMapper.MessagingGatewaySupport.setRequestMapper(InboundMessageMapper)
public S replyMapper(OutboundMessageMapper<?> replyMapper)
OutboundMessageMapper
to use.replyMapper
- the replyMapper.MessagingGatewaySupport.setReplyMapper(OutboundMessageMapper)
public S shouldTrack(boolean shouldTrack)
shouldTrack
- the tracking flagMessagingGatewaySupport.setShouldTrack(boolean)