Package net.i2p.router.client
Class LeaseRequestState
- java.lang.Object
-
- net.i2p.router.client.LeaseRequestState
-
class LeaseRequestState extends Object
Bundle up the data points necessary when asynchronously requesting a lease from a client
-
-
Constructor Summary
Constructors Constructor Description LeaseRequestState(Job onGranted, Job onFailed, long currentEarliestLeastDate, long expiration, LeaseSet requested)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetCurrentEarliestLeaseDate()The earliest lease expiration time in the current LS (NOT the requested one), or 0 if none.longgetExpiration()when the request for the lease set expiresLeaseSetgetGranted()created lease set from client - FIXME always nullbooleangetIsSuccessful()whether the request was successful in the time allottedJobgetOnFailed()what to do if the lease set create fails / times outJobgetOnGranted()what to do once the lease set is createdLeaseSetgetRequested()lease set that is being requestedvoidsetGranted(LeaseSet ls)FIXME unused - why?voidsetIsSuccessful(boolean is)StringtoString()
-
-
-
Constructor Detail
-
LeaseRequestState
public LeaseRequestState(Job onGranted, Job onFailed, long currentEarliestLeastDate, long expiration, LeaseSet requested)
- Parameters:
currentEarliestLeastDate- absolute time, the earliest expiration in the current LS (NOT the requested one), or 0 if noneexpiration- absolute time, when the request expires (not when the LS expires)requested- LeaseSet with requested leases - this object must be updated to contain the signed version (as well as any changed/added/removed Leases) The LeaseSet contains Leases and destination only, it is unsigned.
-
-
Method Detail
-
getGranted
public LeaseSet getGranted()
created lease set from client - FIXME always null
-
setGranted
public void setGranted(LeaseSet ls)
FIXME unused - why?
-
getRequested
public LeaseSet getRequested()
lease set that is being requested
-
getOnGranted
public Job getOnGranted()
what to do once the lease set is created
-
getOnFailed
public Job getOnFailed()
what to do if the lease set create fails / times out
-
getExpiration
public long getExpiration()
when the request for the lease set expires
-
getCurrentEarliestLeaseDate
public long getCurrentEarliestLeaseDate()
The earliest lease expiration time in the current LS (NOT the requested one), or 0 if none.- Since:
- 0.9.39
-
getIsSuccessful
public boolean getIsSuccessful()
whether the request was successful in the time allotted
-
setIsSuccessful
public void setIsSuccessful(boolean is)
-
-