spring-framework / org.springframework.messaging.tcp.reactor / ReactorNettyTcpClient / <init>

<init>

ReactorNettyTcpClient(host: String, port: Int, codec: ReactorNettyCodec<P>)

Simple constructor with a host and a port.

Parameters

host - the host to connect to

port - the port to connect to

codec - the code to use

See Also
org.springframework.messaging.simp.stomp.StompReactorNettyCodec

ReactorNettyTcpClient(optionsConsumer: Consumer<Builder<*>>, codec: ReactorNettyCodec<P>)

Constructor with a ClientOptions.Builder that can be used to customize Reactor Netty client options.

Note: this constructor manages the lifecycle of the TcpClient and its underlying resources. Please do not customize any of the following options: ChannelGroup, LoopResources, and PoolResources. You may set the disablePool option if you simply want to turn off pooling.

For full control over the initialization and lifecycle of the TcpClient, see #ReactorNettyTcpClient(TcpClient, ReactorNettyCodec).

Parameters

optionsConsumer - consumer to customize client options

codec - the code to use

See Also
org.springframework.messaging.simp.stomp.StompReactorNettyCodec

ReactorNettyTcpClient(tcpClient: TcpClient, codec: ReactorNettyCodec<P>)

Constructor with an externally created TcpClient instance whose lifecycle is expected to be managed externally.

Parameters

tcpClient - the TcpClient instance to use

codec - the code to use

See Also
org.springframework.messaging.simp.stomp.StompReactorNettyCodec