static @Nullable String getRmiServerHostname(final @Nullable String hostnameForClients,
      final @Nullable String hostnameForServer, final boolean sslEnabled) {
    if (isNotBlank(hostnameForClients)) {
      return hostnameForClients;
    } else if (sslEnabled && isNotBlank(hostnameForServer)) {
      return hostnameForServer;
    }
    return null;
  }
Gets the hostname that should be set on the RMI server for based on the given values.

@param hostnameForClients the hostname clients will expect to access.
@param hostnameForServer the hostname that this server is bound to.
@param sslEnabled is SSL enabled.
@return {@code hostnameForClients} if not blank, otherwise {@code hostnameForServer} if not
        blank and {@code sslEnabled}, otherwise {@code null}.
geode-core/src/main/java/org/apache/geode/management/internal/ManagementAgent.java