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() |
| Modifier and Type | Method and Description |
|---|---|
void |
addEncryptionKey(PublicKey key)
Add an encryption key.
|
void |
addLease(Lease lease)
Adds a lease to this leaseset.
|
boolean |
equals(Object object) |
int |
getType()
Get the type of the data structure.
|
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)
Sets the encryption key for this leaseset.
|
int |
size()
Number of bytes, NOT including signature
|
String |
toString() |
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)
LeaseSet2addEncryptionKey in class LeaseSet2UnsupportedOperationException - alwayspublic void addLease(Lease lease)
LeaseSetaddLease in class LeaseSet2lease - must be a MetaLeaseIllegalArgumentException - if not a MetaLeasepublic int getType()
DatabaseEntrypublic 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)
LeaseSetsetEncryptionKey in class LeaseSetUnsupportedOperationException - alwaysprotected void writeBytesWithoutSig(OutputStream out) throws DataFormatException, IOException
writeBytesWithoutSig in class LeaseSet2DataFormatExceptionIOException