Enum Class SessionProtocol

java.lang.Object
java.lang.Enum<SessionProtocol>
com.linecorp.armeria.common.SessionProtocol
All Implemented Interfaces:
Serializable, Comparable<SessionProtocol>, java.lang.constant.Constable

public enum SessionProtocol extends Enum<SessionProtocol>
Session-level protocol that provides facilities such as framing and flow control.
  • Enum Constant Details

  • Method Details

    • values

      public static SessionProtocol[] 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 SessionProtocol 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 SessionProtocol of(String uriText)
      Returns the SessionProtocol with the specified uriText().
      Throws:
      IllegalArgumentException - if there's no such SessionProtocol
    • find

      @Nullable public static @Nullable SessionProtocol find(String uriText)
      Finds the SessionProtocol with the specified uriText().
    • httpValues

      public static Set<SessionProtocol> httpValues()
      Returns an immutable Set that contains HTTP, H1C and H2C. Note that it does not contain HTTPS protocols such as HTTPS, H1 and H2.
      See Also:
      httpsValues()
    • httpsValues

      public static Set<SessionProtocol> httpsValues()
      Returns an immutable Set that contains HTTPS, H1 and H2. Note that it does not contain HTTP protocols such as HTTP, H1C and H2C.
      See Also:
      httpValues()
    • isHttp

      public boolean isHttp()
      Returns true if this SessionProtocol is one of HTTP, H1C and H2C.
      See Also:
      httpValues()
    • isHttps

      public boolean isHttps()
      Returns true if this SessionProtocol is one of HTTPS, H1 and H2.
      See Also:
      httpsValues()
    • isTls

      public boolean isTls()
      Returns true if and only if this protocol uses TLS as its transport-level security layer.
    • uriText

      public String uriText()
      Returns the textual representation of this format for use in a Scheme.
    • isMultiplex

      public boolean isMultiplex()
      Returns true if and only if this protocol can multiplex a single transport-layer connection into more than one stream.
    • defaultPort

      public int defaultPort()
      Returns the default INET port number of this protocol.
    • toString

      public String toString()
      Overrides:
      toString in class Enum<SessionProtocol>