public String getExternalAddress(boolean checkServerRunning) {
    if (checkServerRunning) {
      if (!isRunning()) {
        cache.getCancelCriterion().checkCancelInProgress(null);
        throw new IllegalStateException(CACHE_SERVER_BIND_ADDRESS_NOT_AVAILABLE_EXCEPTION_MESSAGE);
      }
    }
    if (hostnameForClients == null || hostnameForClients.isEmpty()) {
      if (acceptor != null) {
        return acceptor.getExternalAddress();
      } else {
        return null;
      }
    } else {
      return hostnameForClients;
    }
  }
Gets the address that this cache server can be contacted on from external processes.

@since GemFire 5.7
geode-core/src/main/java/org/apache/geode/internal/cache/CacheServerImpl.java