Package io.github.mahmoudimus.quic.token
Record Class TokenPayload.Validation
java.lang.Object
java.lang.Record
io.github.mahmoudimus.quic.token.TokenPayload.Validation
- Record Components:
ip- the client's IP addressissued- when the token was issued
- All Implemented Interfaces:
TokenPayload
- Enclosing interface:
TokenPayload
public static record TokenPayload.Validation(InetAddress ip, Instant issued)
extends Record
implements TokenPayload
A token sent in a NEW_TOKEN frame (RFC 9000 section 8.1.3), for a later connection. It is
bound to the client's IP address only, since the port likely changes.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.mahmoudimus.quic.token.TokenPayload
TokenPayload.Retry, TokenPayload.Validation -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.ip()Returns the value of theiprecord component.issued()Returns the value of theissuedrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Validation
A validation payload.- Parameters:
ip- the client's IP addressissued- when issued; fractions of a second are dropped
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
ip
Returns the value of theiprecord component.- Returns:
- the value of the
iprecord component
-
issued
Returns the value of theissuedrecord component.- Specified by:
issuedin interfaceTokenPayload- Returns:
- the value of the
issuedrecord component
-