Package com.linecorp.armeria.common
Enum 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.
-
Nested Class Summary
-
Enum Constant Summary
-
Method Summary
Modifier and Type Method Description intdefaultPort()Returns the default INET port number of this protocol.static SessionProtocolfind(String uriText)Finds theSessionProtocolwith the specifieduriText().static Set<SessionProtocol>httpsValues()static Set<SessionProtocol>httpValues()booleanisMultiplex()Returnstrueif and only if this protocol can multiplex a single transport-layer connection into more than one stream.booleanisTls()Returnstrueif and only if this protocol uses TLS as its transport-level security layer.static SessionProtocolof(String uriText)Returns theSessionProtocolwith the specifieduriText().StringtoString()StringuriText()Returns the textual representation of this format for use in aScheme.static SessionProtocolvalueOf(String name)Returns the enum constant of this type with the specified name.static SessionProtocol[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
of
Returns theSessionProtocolwith the specifieduriText().- Throws:
IllegalArgumentException- if there's no suchSessionProtocol
-
find
Finds theSessionProtocolwith the specifieduriText(). -
httpValues
Returns an immutableSetthat containsHTTP,H1CandH2C. Note that it does not contain HTTPS protocols such asHTTPS,H1andH2.- See Also:
httpsValues()
-
httpsValues
Returns an immutableSetthat containsHTTPS,H1andH2. Note that it does not contain HTTP protocols such asHTTP,H1CandH2C.- See Also:
httpValues()
-
isTls
public boolean isTls()Returnstrueif and only if this protocol uses TLS as its transport-level security layer. -
uriText
Returns the textual representation of this format for use in aScheme. -
isMultiplex
public boolean isMultiplex()Returnstrueif 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
- Overrides:
toStringin classEnum<SessionProtocol>
-