public final class Uri
extends java.lang.Object
Uris form the basis for uniquely identifying components within ESP.
A Uri is resolved or interpreted in the global context. Based on the type of an Uri it can have the following components specified
esp[s]://h1:p1[[;h2:p2;h3:p3]/workspace/project/stream]where
esp[s] - is the protocol to use. Adding and 's' indicates SSL connectionh1:p1[[;h2:p2;h3:p3] - host and port tuples denoting a list of one or more cluster managers.workspace - workspace nameproject - project name in the above workspacestream - stream name
Uris can be used to locate or access components from the global
SDK context. It is also possible to locate or access components from
their hierarchical parents in the ESP component hierarchy. Thus a
Project can be retrieved from the corresponding server using
the project name or a Stream from a Project using
the stream name (and possibly the stream id). The SDK ensures Uri consistency
between these two methods.
While connection is not made using uris, to ensure consistency in usage of the SDK, project
objects for standalone instances do have an effective uri generated internally by the SDK.
The format for these uris is esp://esp_virtual_server:0000/default/<host>:<port>
where host and port are the original values specified by the user.
| Modifier and Type | Class and Description |
|---|---|
static class |
Uri.Builder |
static class |
Uri.UriType
Enumeration of different Uri types supported in the SDK.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String[] |
getManagers()
Retrieve the list of known cluster managers.
|
java.net.URL[] |
getManagerUrls()
Returns an array of URL specifications that can be used to connect to a running cluster.
|
java.lang.String |
getProjectName()
Retrieve the name of the project in the Uri.
|
java.lang.String |
getServerName()
Retrieve the cluster name denoted by the Uri.
|
java.lang.String |
getStreamName()
Retrieve the name of stream in the Uri.
|
Uri.UriType |
getType()
Retrieve the type of the Uri
|
java.lang.String |
getWorkspaceName()
Retrieve the workspace name in the Uri.
|
int |
hashCode() |
boolean |
isSSL()
Determine if the Uri denotes an SSL connection to the cluster.
|
java.lang.String |
toString()
Retrieve a string representation of the Uri.
|
public Uri.UriType getType()
public java.lang.String getServerName()
public java.lang.String[] getManagers()
public java.lang.String getWorkspaceName()
Uri.UriType.WORKSPACE, Uri.UriType.PROJECT
and Uri.UriType.STREAM uri types.public java.lang.String getProjectName()
Uri.UriType.PROJECT
and Uri.UriType.STREAM uri types.public java.lang.String getStreamName()
Uri.UriType.STREAM uri type.public boolean isSSL()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.net.URL[] getManagerUrls()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object