Class DeephavenTarget

java.lang.Object
io.deephaven.uri.DeephavenTarget

@Immutable public abstract class DeephavenTarget extends Object
A Deephaven target represents the information necessary to establish a connection to a remote Deephaven service.

A Deephaven target has a secure flag, host, and optional port. When the port is not specified, it's up to the client to determine the appropriate port (possibly by using a default port or discovering the appropriate port to use).

See Also:
  • Constructor Details

    • DeephavenTarget

      public DeephavenTarget()
  • Method Details

    • builder

      public static DeephavenTarget.Builder builder()
    • isValidScheme

      public static boolean isValidScheme(String scheme)
      Returns true if the scheme is valid for a Deephaven target.

      The valid schemes are "dh" and "dh+plain".

      Parameters:
      scheme - the scheme
      Returns:
      true iff scheme is valid for Deephaven target
    • isWellFormed

      public static boolean isWellFormed(URI uri)
    • of

      public static DeephavenTarget of(URI targetUri)
      Parses the targetUri into a Deephaven target.

      The valid formats include dh://host, dh://host:port, dh+plain://host, and dh+plain://host:port.

      Parameters:
      targetUri - the target URI
      Returns:
      the Deephaven target
    • from

      public static DeephavenTarget from(URI uri)
      Parses the uri into a Deephaven target, without strict URI checks. Useful when parsing a Deephaven target as part of a structured URI.
      Parameters:
      uri - the URI
      Returns:
      the Deephaven target
    • isSecure

      public abstract boolean isSecure()
      The secure flag, typically representing Transport Layer Security (TLS).
      Returns:
      true if secure
    • host

      public abstract String host()
      The host or IP address.
      Returns:
      the host
    • port

      public abstract OptionalInt port()
      The optional port.
      Returns:
      the port
    • toURI

      public final URI toURI()
      The target as a URI.
      Returns:
      the URI
    • toString

      public final String toString()
      The target as a URI string.
      Overrides:
      toString in class Object
      Returns:
      the URI string