static DistributionLocatorConfig createConfigFor(String host, int port, InetAddress bindAddress) {
    String[] info = new String[] {"unknown", "unknown"};

    try {
      TcpClient client = new TcpClient(SocketCreatorFactory
          .getSocketCreatorForComponent(SecurableCommunicationChannel.LOCATOR),
          InternalDataSerializer.getDSFIDSerializer().getObjectSerializer(),
          InternalDataSerializer.getDSFIDSerializer().getObjectDeserializer(),
          TcpSocketFactory.DEFAULT);
      if (bindAddress != null) {
        info = client.getInfo(new HostAndPort(bindAddress.getHostAddress(), port));
      } else {
        info = client.getInfo(new HostAndPort(host, port));
      }
      if (info == null) {
        return null;
      }
    } catch (GemFireConfigException e) {
      // communications are not initialized at this point
    }

    DistributionLocatorConfigImpl config = new DistributionLocatorConfigImpl();
    config.setHost(host);
    config.setPort(port);
    if (bindAddress != null) {
      config.setBindAddress(bindAddress.getHostAddress());
    }
    config.setWorkingDirectory(info[0]);
    config.setProductDirectory(info[1]);

    return config;
  }
Contacts a distribution locator on the given host and port and creates a
<code>DistributionLocatorConfig</code> for it.

@return <code>null</code> if the locator cannot be contacted
geode-core/src/main/java/org/apache/geode/admin/internal/DistributionLocatorConfigImpl.java