Package com.linecorp.armeria.common
Class Scheme
java.lang.Object
com.linecorp.armeria.common.Scheme
- All Implemented Interfaces:
Comparable<Scheme>
A pair of
SerializationFormat
and SessionProtocol
.
A Scheme
is represented and used as the scheme of a URI in the following format:
SerializationFormat.uriText() + '+' + SessionProtocol.uriText()
For example:
"tbinary+https"
"tcompact+h2c"
"none+http"
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
int
hashCode()
static Scheme
of
(SerializationFormat serializationFormat, SessionProtocol sessionProtocol) static Scheme
Returns theSerializationFormat
.Returns theSessionProtocol
.toString()
uriText()
Returns the textual representation ("serializationFormat+sessionProtocol"
).
-
Method Details
-
tryParse
-
parse
Parses the specifiedString
into aScheme
. This method will return the sameScheme
instance for equal values ofscheme
.- Throws:
IllegalArgumentException
- if the specifiedString
could not be parsed or there is no suchScheme
available
-
of
Returns theScheme
of the specifiedSerializationFormat
andSessionProtocol
. This method returns the sameScheme
instance for the same combination ofSerializationFormat
andSessionProtocol
. -
serializationFormat
Returns theSerializationFormat
. -
sessionProtocol
Returns theSessionProtocol
. -
uriText
Returns the textual representation ("serializationFormat+sessionProtocol"
). -
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Scheme>
-
toString
-