Enum Class SpaceId

java.lang.Object
java.lang.Enum<SpaceId>
io.github.mahmoudimus.quic.connection.SpaceId
All Implemented Interfaces:
Serializable, Comparable<SpaceId>, Constable

public enum SpaceId extends Enum<SpaceId>
The three packet number spaces (RFC 9000 section 12.3). They are ordered: Initial, then Handshake, then application data.
  • Enum Constant Details

    • INITIAL

      public static final SpaceId INITIAL
      Initial packets.
    • HANDSHAKE

      public static final SpaceId HANDSHAKE
      Handshake packets.
    • DATA

      public static final SpaceId DATA
      0-RTT and 1-RTT packets, which share a space.
  • Method Details

    • values

      public static SpaceId[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SpaceId valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • of

      public static SpaceId of(EncryptionLevel level)
      The space of an encryption level.
      Parameters:
      level - the level
      Returns:
      DATA for 0-RTT and 1-RTT