Package io.deephaven.uri
Class DeephavenTarget
java.lang.Object
io.deephaven.uri.DeephavenTarget
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:
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic DeephavenTarget.Builder
builder()
static DeephavenTarget
Parses theuri
into a Deephaven target, without strict URI checks.abstract String
host()
The host or IP address.abstract boolean
isSecure()
The secure flag, typically representing Transport Layer Security (TLS).static boolean
isValidScheme
(String scheme) Returns true if the scheme is valid for a Deephaven target.static boolean
isWellFormed
(URI uri) static DeephavenTarget
Parses thetargetUri
into a Deephaven target.abstract OptionalInt
port()
The optional port.final String
toString()
The target as a URI string.final URI
toURI()
The target as a URI.
-
Constructor Details
-
DeephavenTarget
public DeephavenTarget()
-
-
Method Details
-
builder
-
isValidScheme
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
-
of
Parses thetargetUri
into a Deephaven target.The valid formats include
dh://host
,dh://host:port
,dh+plain://host
, anddh+plain://host:port
.- Parameters:
targetUri
- the target URI- Returns:
- the Deephaven target
-
from
Parses theuri
into a Deephaven target, without strict URI checks. Useful when parsing a Deephaven target as part of astructured 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
The host or IP address.- Returns:
- the host
-
port
The optional port.- Returns:
- the port
-
toURI
The target as a URI.- Returns:
- the URI
-
toString
The target as a URI string.
-