Class Tcp
java.lang.Object
org.springframework.integration.ip.dsl.Tcp
public final class Tcp extends Object
Factory methods for TCP.
- Since:
- 5.0
- Author:
- Gary Russell, Tim Ysewyn, Artem Bilan
-
Method Summary
Modifier and Type Method Description static TcpInboundChannelAdapterSpecinboundAdapter(AbstractConnectionFactorySpec<?,?> connectionFactorySpec)Create an inbound channel adapter using the supplied connection factory.static TcpInboundChannelAdapterSpecinboundAdapter(AbstractConnectionFactory connectionFactory)Create an inbound channel adapter using the supplied connection factory.static TcpInboundGatewaySpecinboundGateway(AbstractConnectionFactorySpec<?,?> connectionFactorySpec)Create an inbound gateway using the supplied connection factory.static TcpInboundGatewaySpecinboundGateway(AbstractConnectionFactory connectionFactory)Create an inbound gateway using the supplied connection factory.static TcpClientConnectionFactorySpecnetClient(String host, int port)Create a client spec that does not use NIO.static TcpServerConnectionFactorySpecnetServer(int port)Create a server spec that does not use NIO.static TcpClientConnectionFactorySpecnioClient(String host, int port)Create a client spec that uses NIO.static TcpServerConnectionFactorySpecnioServer(int port)Create a server spec that uses NIO.static TcpOutboundChannelAdapterSpecoutboundAdapter(AbstractConnectionFactorySpec<?,?> connectionFactorySpec)Create an outbound gateway using the supplied connection factory.static TcpOutboundChannelAdapterSpecoutboundAdapter(AbstractConnectionFactory connectionFactory)Create an outbound gateway using the supplied connection factory.static TcpOutboundGatewaySpecoutboundGateway(TcpClientConnectionFactorySpec connectionFactory)Create an outbound gateway using the supplied client connection factory.static TcpOutboundGatewaySpecoutboundGateway(AbstractClientConnectionFactory connectionFactory)Create an outbound gateway using the supplied client connection factory.
-
Method Details
-
nioServer
Create a server spec that uses NIO.- Parameters:
port- the port to listen on.- Returns:
- the spec.
-
netServer
Create a server spec that does not use NIO.- Parameters:
port- the port to listen on.- Returns:
- the spec.
-
nioClient
Create a client spec that uses NIO.- Parameters:
host- the host to connect to.port- the port to connect to.- Returns:
- the spec.
-
netClient
Create a client spec that does not use NIO.- Parameters:
host- the host to connect to.port- the port to connect to.- Returns:
- the spec.
-
inboundGateway
Create an inbound gateway using the supplied connection factory.- Parameters:
connectionFactory- the connection factory - must be an existing bean - it will not be initialized.- Returns:
- the spec.
-
inboundGateway
public static TcpInboundGatewaySpec inboundGateway(AbstractConnectionFactorySpec<?,?> connectionFactorySpec)Create an inbound gateway using the supplied connection factory.- Parameters:
connectionFactorySpec- the connection factory spec.- Returns:
- the spec.
-
inboundAdapter
public static TcpInboundChannelAdapterSpec inboundAdapter(AbstractConnectionFactory connectionFactory)Create an inbound channel adapter using the supplied connection factory.- Parameters:
connectionFactory- the connection factory - must be an existing bean - it will not be initialized.- Returns:
- the spec.
-
inboundAdapter
public static TcpInboundChannelAdapterSpec inboundAdapter(AbstractConnectionFactorySpec<?,?> connectionFactorySpec)Create an inbound channel adapter using the supplied connection factory.- Parameters:
connectionFactorySpec- the connection factory spec.- Returns:
- the spec.
-
outboundGateway
public static TcpOutboundGatewaySpec outboundGateway(AbstractClientConnectionFactory connectionFactory)Create an outbound gateway using the supplied client connection factory.- Parameters:
connectionFactory- the connection factory - must be an existing bean - it will not be initialized.- Returns:
- the spec.
-
outboundGateway
public static TcpOutboundGatewaySpec outboundGateway(TcpClientConnectionFactorySpec connectionFactory)Create an outbound gateway using the supplied client connection factory.- Parameters:
connectionFactory- the connection factory spec.- Returns:
- the spec.
-
outboundAdapter
public static TcpOutboundChannelAdapterSpec outboundAdapter(AbstractConnectionFactory connectionFactory)Create an outbound gateway using the supplied connection factory.- Parameters:
connectionFactory- the connection factory - must be an existing bean - it will not be initialized.- Returns:
- the spec.
-
outboundAdapter
public static TcpOutboundChannelAdapterSpec outboundAdapter(AbstractConnectionFactorySpec<?,?> connectionFactorySpec)Create an outbound gateway using the supplied connection factory.- Parameters:
connectionFactorySpec- the connection factory.- Returns:
- the spec.
-