public class MetaLease extends Lease
MetaLease extends the Lease concept to reference other LeaseSets rather than tunnel endpoints:
Structure:
Lease.getGateway())Key Differences from Lease:
UnsupportedOperationException)Usage Scenarios:
Selection Criteria:
Implementation Status: PRELIMINARY - Subject to change as proposal evolves
| Modifier and Type | Field and Description |
|---|---|
static int |
LENGTH |
| Constructor and Description |
|---|
MetaLease() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object) |
int |
getCost() |
TunnelId |
getTunnelId()
Tunnel on the gateway to communicate with
|
int |
getType() |
int |
hashCode() |
void |
readBytes(InputStream in)
Load up the current object with data from the given stream.
|
void |
setCost(int cost) |
void |
setTunnelId(TunnelId id)
Configure the tunnel on the gateway to communicate with
|
void |
setType(int type) |
String |
toString() |
void |
writeBytes(OutputStream out)
Write out the data structure to the stream, using the format defined in the
I2P data structure specification.
|
getEndTime, getGateway, isExpired, isExpired, setEndDate, setGatewaycalculateHash, fromBase64, fromByteArray, read, toBase64, toByteArraypublic static final int LENGTH
public int getCost()
public TunnelId getTunnelId()
LeasegetTunnelId in class LeaseUnsupportedOperationException - alwayspublic int getType()
public void readBytes(InputStream in) throws DataFormatException, IOException
DataStructurereadBytes in interface DataStructurereadBytes in class Leasein - stream to read fromDataFormatException - if the data is improperly formattedIOException - if there was a problem reading the streampublic void setCost(int cost)
public void setTunnelId(TunnelId id)
LeasesetTunnelId in class Leaseid - tunnel IDUnsupportedOperationException - alwayspublic void setType(int type)
public void writeBytes(OutputStream out) throws DataFormatException, IOException
DataStructurewriteBytes in interface DataStructurewriteBytes in class Leaseout - stream to write toDataFormatException - if the data was incomplete or not yet ready to be writtenIOException - if there was a problem writing to the stream