Package io.deephaven.frontend.info
Class FrontendInfo
java.lang.Object
io.deephaven.frontend.info.FrontendInfo
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 Summary
FieldsModifier and TypeFieldDescriptionstatic StringThe complete Envoy front proxy URL in "host:port" format.static final StringConfiguration property key for the Envoy front proxy URL in "host:port" format.static StringThe hostname where Envoy is configured to run.static intThe port number where Envoy is configured to run.static final StringThe configured Web API server hostname.static final intThe configured Web API server port.static final StringConfiguration property key for the Web API server hoststatic final StringConfiguration property key for the Web API server port -
Method Summary
Modifier and TypeMethodDescriptionstatic StringRetrieves the Envoy front proxy URL from configuration.static StringExtract the host from a url, returns the default value if there are any issues extracting the host.static intExtract the port from a url, returns the default value if there are any issues extracting the host.
-
Field Details
-
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
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 usinggetEnvoyFrontProxy(). -
ENVOY_PORT
public static int ENVOY_PORTThe port number where Envoy is configured to run. Defaults to 8000 if not specified in the Envoy front proxy URL. -
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
Configuration property key for the Web API server host- See Also:
-
WEB_API_SERVER_PORT_PROPERTY
Configuration property key for the Web API server port- See Also:
-
WEB_API_HOST
The configured Web API server hostname. Retrieved directly from configuration usingWEB_API_SERVER_HOST_PROPERTY. -
WEB_API_PORT
public static final int WEB_API_PORTThe configured Web API server port. Retrieved from configuration usingWEB_API_SERVER_PORT_PROPERTY, defaults to 8123 if not specified.
-
-
Method Details
-
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
Extract the host from a url, returns the default value if there are any issues extracting the host.- Parameters:
url- the source URLdefaultValue- 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
Extract the port from a url, returns the default value if there are any issues extracting the host.- Parameters:
url- the source URLdefaultValue- 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
-