|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.vattp.data.EARL
Untamed: A parsed URI designating an E object. Created by parsing of a human-readible reference to an E-object. The human readable form is:
cap://searchpath/vatID/swissStr[/expirationDate]where
The "searchpath" is a semicolon-separated list of network addresses to search to locate the vat designated by the "vatID". At these addresses may be found either vats or VLSes.
Each network address is expected to be of the form parsed by
NetAddr.NetAddr(String)
.
The "vatID", which is the identity of a vat -- a public key fingerprint encoded in base 64. A vatID designates any vat that authenticates using the corresponding private key. It is generally assumed that there is only one such live vat at any moment, but this assumption is unenforceable.
The "swissStr" is the Swiss number of the object within that vat. It is an unguessable secret number, encoded in base 64, whose knowledge demonstrates authority to invoke the object it designates.
"expirationDate" is the optional registration expiration date. as the difference, measured in milliseconds, between the expiration time and midnight, January 1, 1970 UTC (known as the epoch). If the expiration date is omitted or is equal to Long.MAX_VALUE milliseconds since the epoch, then the expiration is assumed to be infinite.
The format of this date field is according to
org.erights.e.develop.format.ETimeFormat#formatTime(long)
Note that base 64 is supported by
BigIntegerSugar.toString64(BigInteger)
and
BigIntegerMakerSugar.fromString64(String)
.
Field Summary | |
private long |
myExpiration
|
private ConstList |
mySearchPath
|
private String |
mySwissStr
|
private String |
myURI
|
private String |
myVatID
|
Constructor Summary | |
EARL(ConstList searchPath,
String vatID,
BigInteger swissNum,
long expiration)
Enabled: Construct an EARL given the components of the URI. |
|
EARL(String uri)
Enabled: Construct an EARL given the URI string. |
Method Summary | |
void |
__printOn(TextWriter out)
Enabled: Since this corresponds to an E URI expression, print with angle brackets. |
long |
expiration()
Enabled: Return the expiration date string for this EARL. |
static String |
flattenSearchPath(ConstList path)
Enabled: |
private void |
parseEARL(String uri)
Parse a URI into its constituent elements, saving them as our own. |
static ConstList |
parseSearchPath(String path)
Enabled: Parse a (semicolon-separated) search path into its constituent elements |
ConstList |
searchPath()
Enabled: Return the search path for this EARL. |
BigInteger |
swissNumber()
Enabled: Return the swissStr for this EARL as a swissNumber. |
String |
swissStr()
Enabled: Return the swissStr string for this EARL. |
String |
toString()
Suppressed: Return the fully-composed URI string for this EARL. |
String |
vatID()
Enabled: Return the vatID string for this EARL. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private String myURI
private ConstList mySearchPath
private String myVatID
private String mySwissStr
private long myExpiration
Constructor Detail |
public EARL(ConstList searchPath, String vatID, BigInteger swissNum, long expiration) throws MalformedURLException
searchPath
- The search path, a list of domain names and/or IP
addresses.vatID
- is the vatID for the object, a base-36 encoded
public key fingerprint.swissNum
- is the swissNumber for the object.expiration
- is the registration expiration date. It is
the difference, measured in milliseconds, between the expiration
time and midnight, January 1, 1970 UTC (the epoch). A value equal
to Long.MAX_VALUE will also be treated as infinite expiration.public EARL(String uri) throws MalformedURLException
uri
- is an URI of the form: "cap://searchpath/vatID/swissStr[/expirationDate]".See the class comment for an explanation of the fields of this format.
Method Detail |
public long expiration()
public static String flattenSearchPath(ConstList path)
public String swissStr()
public BigInteger swissNumber()
private void parseEARL(String uri) throws MalformedURLException
Modified by MarkM so that it strips off any number of leading "cap:" prefixes, including zero, enabling it to accept URI bodies as well.
uri
- The URI string to be parsed.
MalformedURLException
public static ConstList parseSearchPath(String path)
path
- The search path to be parsed
public ConstList searchPath()
public String toString()
toString
in class Object
public void __printOn(TextWriter out) throws IOException
IOException
public String vatID()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |