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 Details

    • nioServer

      public static TcpNioServerConnectionFactorySpec nioServer(int port)
      Create a server spec that uses NIO.
      Parameters:
      port - the port to listen on.
      Returns:
      the spec.
    • netServer

      public static TcpNetServerConnectionFactorySpec netServer(int port)
      Create a server spec that does not use NIO.
      Parameters:
      port - the port to listen on.
      Returns:
      the spec.
    • nioClient

      public static TcpNioClientConnectionFactorySpec nioClient(String host, int port)
      Create a client spec that uses NIO.
      Parameters:
      host - the host to connect to.
      port - the port to connect to.
      Returns:
      the spec.
    • netClient

      public static TcpNetClientConnectionFactorySpec netClient(String host, int port)
      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

      public static TcpInboundGatewaySpec inboundGateway(AbstractConnectionFactory connectionFactory)
      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.