Class FrontendInfo

java.lang.Object
io.deephaven.frontend.info.FrontendInfo

public final class FrontendInfo extends Object
WebHostInfo: A class which looks up the hostname and port information for a given Deephaven cluster.

If envoy is in use, this will be the hostname and port of the envoy server, defined by envoy.front.proxy.url configuration property, which contains both hostname and port.

If envoy is in not in use, this will be the hostname and port of the web_api_service, defined by Webapi.server.host and Webapi.server.port configuration properties.

  • Field Details

    • ENVOY_FRONT_PROXY_PROP

      public static final String ENVOY_FRONT_PROXY_PROP
      Configuration property key for the Envoy front proxy URL in "host:port" format. This property determines if and where Envoy will be running.
      See Also:
    • ENVOY_FRONT_PROXY

      public static String ENVOY_FRONT_PROXY
      The complete Envoy front proxy URL in "host:port" format. This value is null by default and serves as an enable-check for Envoy functionality. Retrieved from configuration using getEnvoyFrontProxy().
    • ENVOY_PORT

      public static int ENVOY_PORT
      The port number where Envoy is configured to run. Defaults to 8000 if not specified in the Envoy front proxy URL.
    • ENVOY_HOST

      public static String ENVOY_HOST
      The hostname where Envoy is configured to run. Defaults to "localhost" if not specified in the Envoy front proxy URL.
    • WEB_API_SERVER_HOST_PROPERTY

      public static final String WEB_API_SERVER_HOST_PROPERTY
      Configuration property key for the Web API server host
      See Also:
    • WEB_API_SERVER_PORT_PROPERTY

      public static final String WEB_API_SERVER_PORT_PROPERTY
      Configuration property key for the Web API server port
      See Also:
    • WEB_API_HOST

      public static final String WEB_API_HOST
      The configured Web API server hostname. Retrieved directly from configuration using WEB_API_SERVER_HOST_PROPERTY.
    • WEB_API_PORT

      public static final int WEB_API_PORT
      The configured Web API server port. Retrieved from configuration using WEB_API_SERVER_PORT_PROPERTY, defaults to 8123 if not specified.
  • Method Details

    • getEnvoyFrontProxy

      public static String getEnvoyFrontProxy()
      Retrieves the Envoy front proxy URL from configuration.
      Returns:
      The configured Envoy front proxy URL, or null if disabled or not configured. An empty string in the configuration disables the proxy and returns null.
    • urlToHost

      public static String urlToHost(@Nullable String url, @Nullable String defaultValue)
      Extract the host from a url, returns the default value if there are any issues extracting the host.
      Parameters:
      url - the source URL
      defaultValue - a value to use if the input url is null or bad
      Returns:
      the host part of the URL, or the default value if url is null or doesn't parse
    • urlToPort

      public static int urlToPort(@Nullable String url, int defaultValue)
      Extract the port from a url, returns the default value if there are any issues extracting the host.
      Parameters:
      url - the source URL
      defaultValue - a value to use if the input url is null or bad
      Returns:
      the port part of the URL, or the default value if url is null or doesn't parse