|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.avis.common.ElvinURI
public class ElvinURI
An Elvin URI identifying an Elvin router as described in the "Elvin URI Scheme" specification at http://elvin.org/specs/draft-elvin-uri-prelim-02.txt. The most common Elvin URI for a TCP endpoint is of the form (sections in in [] are optional):
elvin:[version]/[protocol]/hostname[:port][;options] version: protocol version major.minor form e.g. "4.0" protocol: protocol stack in transport,security,marshalling order e.g. "tcp,none,xdr". Alternatively the alias "secure" can be used to denote the default secure stack ("ssl,none,xdr"). options: name1=value1[;name2=value2]* e.g. foo=bar;black=white
Example URI 1: elvin://localhost:2917
Example URI 2: elvin://192.168.0.2:2917;foo=true
Example URI 3: elvin:4.0/ssl,none,xdr/localhost:443
Field Summary | |
---|---|
String |
host
The host name. |
Map<String,String> |
options
The URI options. |
int |
port
The port. |
List<String> |
protocol
The stack of protocol modules in (transport,security,marshalling) order. |
String |
scheme
The URI scheme (i.e the part before the ":"). |
String |
uriString
The original URI string as passed into the constructor. |
int |
versionMajor
Major protocol version. |
int |
versionMinor
Minor protocol version. |
Constructor Summary | |
---|---|
ElvinURI(ElvinURI defaultUri)
Create a copy of a URI. |
|
ElvinURI(String uriString)
Create a new instance. |
|
ElvinURI(String uriString,
ElvinURI defaultUri)
Create a new instance using an existing URI for defaults. |
|
ElvinURI(String host,
int port)
Create a new instance from a host and port using defaults for others. |
Method Summary | |
---|---|
static List<String> |
defaultProtocol()
The default URI protocol stack: "tcp", "none", "xdr" |
boolean |
equals(ElvinURI uri)
|
boolean |
equals(Object obj)
|
int |
hashCode()
|
boolean |
isSecure()
True if this URI specifies secure TLS transport (protocol.equals (secureProtocol ())). |
static List<String> |
secureProtocol()
The secure URI protocol stack: "ssl", "none", "xdr" |
String |
toCanonicalString()
Generate a canonical text version of this URI. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public String uriString
public String scheme
public int versionMajor
Common.CLIENT_VERSION_MAJOR
.
public int versionMinor
Common.CLIENT_VERSION_MINOR
.
public List<String> protocol
defaultProtocol()
public String host
public int port
Common.DEFAULT_PORT
.
public Map<String,String> options
Constructor Detail |
---|
public ElvinURI(String uriString) throws InvalidURIException
uriString
- The URI.
InvalidURIException
- if the URI is not valid.public ElvinURI(String host, int port)
host
- Host name or IP addressport
- Port number.public ElvinURI(String uriString, ElvinURI defaultUri) throws InvalidURIException
uriString
- The URI string.defaultUri
- The URI to use for any values that are not
specified by uriString.
InvalidURIException
- if the URI is not valid.public ElvinURI(ElvinURI defaultUri)
defaultUri
- The URI to copy.Method Detail |
---|
public String toString()
toString
in class Object
public String toCanonicalString()
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public boolean equals(ElvinURI uri)
public static List<String> defaultProtocol()
public static List<String> secureProtocol()
public boolean isSecure()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |