Package com.linecorp.armeria.common
Enum Class ExchangeType
- All Implemented Interfaces:
Serializable
,Comparable<ExchangeType>
,java.lang.constant.Constable
Represents whether to stream an
HttpRequest
or HttpResponse
.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionBidirectional streaming.A streamingHttpRequest
with a non-streamingHttpResponse
.A non-streamingHttpRequest
with a streamingHttpResponse
.No streaming. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether to support request streaming.boolean
Returns whether to support response streaming.static ExchangeType
of
(boolean requestStreaming, boolean responseStreaming) static ExchangeType
Returns the enum constant of this class with the specified name.static ExchangeType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNARY
No streaming. AHttpRequest
and aHttpResponse
will be buffered when they are sent or received. -
REQUEST_STREAMING
A streamingHttpRequest
with a non-streamingHttpResponse
. TheHttpResponse
will be buffered when it is sent or received. -
RESPONSE_STREAMING
A non-streamingHttpRequest
with a streamingHttpResponse
. TheHttpRequest
will be buffered when it is sent or received. -
BIDI_STREAMING
Bidirectional streaming. Neither aHttpRequest
nor aHttpResponse
is buffered.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
of
-
isRequestStreaming
public boolean isRequestStreaming()Returns whether to support request streaming. -
isResponseStreaming
public boolean isResponseStreaming()Returns whether to support response streaming.
-