public class MetaLeaseSet extends LeaseSet2
MetaLeaseSet is a specialized LeaseSet2 that contains references to other LeaseSets rather than direct tunnel endpoints. This enables advanced routing and load balancing strategies.
Key characteristics of MetaLeaseSet:
MetaLease objects instead of regular Lease objectsUnsupportedOperationException)Usage: MetaLeaseSets are used for:
Implementation Status: PRELIMINARY - Subject to change as the proposal evolves
_expires, _flags, _offlineSignature, _options, _published, _transientExpires, _transientSigningPublicKey_byteified, _checked, _destination, _encryptionKey, _lastExpiration, _leases, _signingKey, MAX_LEASES_signature, KEY_TYPE_ENCRYPTED_LS2, KEY_TYPE_LEASESET, KEY_TYPE_LS2, KEY_TYPE_META_LS2, KEY_TYPE_ROUTERINFO, KEY_TYPE_SERVICE_LIST, KEY_TYPE_SERVICE_RECORD| Constructor and Description |
|---|
MetaLeaseSet()Creates a new MetaLeaseSet with default values. |
| Modifier and Type | Method and Description |
|---|---|
void | addEncryptionKey(PublicKey key)UnsupportedOperationException always. |
void | addLease(Lease lease)Must be a MetaLease. |
boolean | equals(Object object)Compares this MetaLeaseSet with another object for equality. |
int | getType()Entry type for the network database. |
int | hashCode()the destination has enough randomness in it to use it by itself for speed |
void | readBytes(InputStream in)This does NOT validate the signature |
void | setEncryptionKey(PublicKey key)UnsupportedOperationException always. |
int | size()Number of bytes, NOT including signature |
String | toString()Returns a string representation of this MetaLeaseSet. |
protected void | writeBytesWithoutSig(OutputStream out)Without sig. |
encrypt, getBlindedHash, getBytes, getEncryptionKey, getEncryptionKey, getEncryptionKeys, getExpires, getOption, getOptions, getPublished, getReceivedAsPublished, getTransientExpiration, getTransientSigningKey, isBlindedWhenPublished, isCurrent, isOffline, isUnpublished, offlineSign, readHeader, readOfflineBytes, setBlindedHash, setBlindedWhenPublished, setOfflineSignature, setOptions, setPublished, setSigningKey, setUnpublished, sign, verifyOfflineSignature, verifyOfflineSignature, verifySignature, writeBody, writeBytes, writeHeader, writeOfflineBytesgetDate, getDestination, getEarliestLeaseDate, getKeysAndCert, getLatestLeaseDate, getLease, getLeaseCount, getSigningKey, setDestination, setReceivedBygetHash, getReceivedAsReply, getReceivedBy, getRoutingKey, getSignature, getSigningPublicKey, isLeaseSet, isLeaseSet, isRouterInfo, setReceivedAsPublished, setReceivedAsReply, setSignature, validateRoutingKeycalculateHash, fromBase64, fromByteArray, read, toBase64, toByteArraypublic void addEncryptionKey(PublicKey key)
addEncryptionKey in class LeaseSet2UnsupportedOperationException - alwayspublic void addLease(Lease lease)
addLease in class LeaseSet2lease - must be a MetaLeaseIllegalArgumentException - if not a MetaLeasepublic boolean equals(Object object)
public int getType()
public int hashCode()
public void readBytes(InputStream in) throws DataFormatException, IOException
readBytes in interface DataStructurereadBytes in class LeaseSet2in - stream to read fromIllegalStateException - if called more than once or Destination already setDataFormatException - if the data is improperly formattedIOException - if there was a problem reading the streampublic void setEncryptionKey(PublicKey key)
setEncryptionKey in class LeaseSetUnsupportedOperationException - alwayspublic int size()
public String toString()
protected void writeBytesWithoutSig(OutputStream out) throws DataFormatException, IOException
writeBytesWithoutSig in class LeaseSet2DataFormatExceptionIOException