Skip to content

TransportClientFactory

Creating Instance

TransportClientFactory takes the following to be created:

TransportClientFactory is created when:

Configuration Properties

While being created, TransportClientFactory requests the given TransportContext for the TransportConf that is used to access the values of the following (configuration) properties:

Creating TransportClient

TransportClient createClient(
  String remoteHost,
  int remotePort) // (1)
TransportClient createClient(
  String remoteHost,
  int remotePort,
  boolean fastFail)
TransportClient createClient(
  InetSocketAddress address)
  1. Turns fastFail off

createClient prints out the following DEBUG message to the logs:

Creating new connection to [address]

createClient creates a Netty Bootstrap and initializes it.

createClient requests the Netty Bootstrap to connect.

If successful, createClient prints out the following DEBUG message and requests the TransportClientBootstraps to doBootstrap.

Connection to [address] successful, running bootstraps...

In the end, createClient prints out the following INFO message:

Successfully created connection to [address] after [t] ms ([t] ms spent in bootstraps)