public class TcpOutboundGatewaySpec extends org.springframework.integration.dsl.MessageHandlerSpec<TcpOutboundGatewaySpec,TcpOutboundGateway> implements org.springframework.integration.dsl.ComponentsRegistration
MessageHandlerSpec for TcpOutboundGateways.| Modifier and Type | Field and Description |
|---|---|
protected AbstractClientConnectionFactory |
connectionFactory |
| Constructor and Description |
|---|
TcpOutboundGatewaySpec(AbstractClientConnectionFactory connectionFactoryBean)
Construct an instance using an existing spring-managed connection factory.
|
TcpOutboundGatewaySpec(TcpClientConnectionFactorySpec connectionFactorySpec)
Construct an instance using the supplied connection factory spec.
|
| Modifier and Type | Method and Description |
|---|---|
TcpOutboundGatewaySpec |
async(boolean async)
Set to true to release the sending thread and receive the reply asynchronously.
|
TcpOutboundGatewaySpec |
closeStreamAfterSend(boolean closeStreamAfterSend)
Set to true to close the connection output stream after sending without
closing the connection.
|
java.util.Map<java.lang.Object,java.lang.String> |
getComponentsToRegister() |
<P> TcpOutboundGatewaySpec |
remoteTimeout(java.util.function.Function<org.springframework.messaging.Message<P>,?> remoteTimeoutFunction)
Configure a
Function that will be invoked at runtime to determine the destination to
which a message will be sent. |
TcpOutboundGatewaySpec |
remoteTimeout(long remoteTimeout) |
TcpOutboundGatewaySpec |
unsolictedMessageChannelName(org.springframework.messaging.MessageChannel channel)
Set the unsolicited message channel.
|
TcpOutboundGatewaySpec |
unsolictedMessageChannelName(java.lang.String channelName)
Set the unsolicited message channel name.
|
_this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stopprotected final AbstractClientConnectionFactory connectionFactory
public TcpOutboundGatewaySpec(AbstractClientConnectionFactory connectionFactoryBean)
connectionFactoryBean - the spring-managed bean.public TcpOutboundGatewaySpec(TcpClientConnectionFactorySpec connectionFactorySpec)
connectionFactorySpec - the spec.public TcpOutboundGatewaySpec remoteTimeout(long remoteTimeout)
remoteTimeout - the remote timeout to set.TcpOutboundGateway.setRemoteTimeout(long)public <P> TcpOutboundGatewaySpec remoteTimeout(java.util.function.Function<org.springframework.messaging.Message<P>,?> remoteTimeoutFunction)
Function that will be invoked at runtime to determine the destination to
which a message will be sent. Typically used with a Java 8 Lambda expression:
.remoteTimeout(m -> m.getHeaders().get('rto'))
P - the message payload type.remoteTimeoutFunction - the function.TcpOutboundGateway.setRemoteTimeoutExpression(org.springframework.expression.Expression)public TcpOutboundGatewaySpec closeStreamAfterSend(boolean closeStreamAfterSend)
ByteArrayRawSerializer.
Requires a single-use connection factory.closeStreamAfterSend - true to close.public TcpOutboundGatewaySpec async(boolean async)
async - true for asynchronous request/reply.public TcpOutboundGatewaySpec unsolictedMessageChannelName(java.lang.String channelName)
channelName - the name.public TcpOutboundGatewaySpec unsolictedMessageChannelName(org.springframework.messaging.MessageChannel channel)
channel - the channel.public java.util.Map<java.lang.Object,java.lang.String> getComponentsToRegister()
getComponentsToRegister in interface org.springframework.integration.dsl.ComponentsRegistration