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
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DeephavenTarget.Builderbuilder()static DeephavenTargetParses theuriinto a Deephaven target, without strict URI checks.abstract Stringhost()The host or IP address.abstract booleanisSecure()The secure flag, typically representing Transport Layer Security (TLS).static booleanisValidScheme(String scheme) Returns true if the scheme is valid for a Deephaven target.static booleanisWellFormed(URI uri) static DeephavenTargetParses thetargetUriinto a Deephaven target.abstract OptionalIntport()The optional port.final StringtoString()The target as a URI string.final URItoURI()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 thetargetUriinto 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 theuriinto 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.
-