java.lang.Object
net.i2p.router.transport.udp.EstablishmentManager.Token
- Enclosing class:
EstablishmentManager
Token used for SSU2 session establishment and validation. Contains expiration time and validation data.
Field Details
token
private final long tokenThe token value itself.expires
private final int expiresWhen the token expires, as an epoch second.added
private final int addedWhen the token was added, as an epoch second.
Constructor Details
Token
public Token(long tok, long exp, long now) Token for the given value and expiration.- Parameters:
tok- nonzero value we later match an inbound request againstexp- absolute time, not relative to nownow- absolute time the token was issued, for expiry reporting
Method Details
getToken
public long getToken()The token value.- Returns:
- the opaque value we match an incoming request against
getExpiration
public long getExpiration()The expiration time.- Returns:
- the absolute time after which the token is no longer accepted
getWhenAdded
public long getWhenAdded()When this token was added.- Returns:
- the absolute time the token was issued
toString