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 and Description
    `LeaseRequestState(Job onGranted, Job onFailed, long currentEarliestLeastDate, long expiration, LeaseSet requested)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getCurrentEarliestLeaseDate()` The earliest lease expiration time in the current LS (NOT the requested one), or 0 if none.
    `long` | `getExpiration()` when the request for the lease set expires
    `LeaseSet` | `getGranted()` created lease set from client - FIXME always null
    `boolean` | `getIsSuccessful()` whether the request was successful in the time allotted
    `Job` | `getOnFailed()` what to do if the lease set create fails / times out
    `Job` | `getOnGranted()` what to do once the lease set is created
    `LeaseSet` | `getRequested()` lease set that is being requested
    `void` | `setGranted(LeaseSet ls)` FIXME unused - why?
    `void` | `setIsSuccessful(boolean is)`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### 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 none
        `expiration` - 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

    - #### getCurrentEarliestLeaseDate

          public long getCurrentEarliestLeaseDate()

      The earliest lease expiration time in the current LS (NOT the requested one), or 0 if none.

    - #### getExpiration

          public long getExpiration()

      when the request for the lease set expires

    - #### getGranted

          public LeaseSet getGranted()

      created lease set from client - FIXME always null

    - #### getIsSuccessful

          public boolean getIsSuccessful()

      whether the request was successful in the time allotted

    - #### getOnFailed

          public Job getOnFailed()

      what to do if the lease set create fails / times out

    - #### getOnGranted

          public Job getOnGranted()

      what to do once the lease set is created

    - #### getRequested

          public LeaseSet getRequested()

      lease set that is being requested

    - #### setGranted

          public void setGranted(LeaseSet ls)

      FIXME unused - why?

    - #### setIsSuccessful

          public void setIsSuccessful(boolean is)

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`