code: public Address[] getAddresses() {
      if (addresses != null)
        return addresses;
  
      if (hosts != null) {
        addresses = new Address[hosts.length];
        for (int i = 0; i < hosts.length; i++)
          addresses[i] = new Address(hosts[i], factory.getPort());
        return addresses;
      }
  
      Address address = factory == null ? new Address("localhost", -1) : new Address(
          factory.getHost(), factory.getPort());
      return new Address[] { address };
    }
docs: Returns the addresses to attempt connections to, in round-robin order.
  
  @see #withAddresses(Address...)
  @see #withAddresses(String)
  @see #withHost(String)
  @see #withHosts(String...)