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 ConstantsEnum ConstantDescriptionBidirectional streaming.A streamingHttpRequestwith a non-streamingHttpResponse.A non-streamingHttpRequestwith a streamingHttpResponse.No streaming. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether to support request streaming.booleanReturns whether to support response streaming.static ExchangeTypeof(boolean requestStreaming, boolean responseStreaming) static ExchangeTypeReturns 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. AHttpRequestand aHttpResponsewill be buffered when they are sent or received. -
REQUEST_STREAMING
A streamingHttpRequestwith a non-streamingHttpResponse. TheHttpResponsewill be buffered when it is sent or received. -
RESPONSE_STREAMING
A non-streamingHttpRequestwith a streamingHttpResponse. TheHttpRequestwill be buffered when it is sent or received. -
BIDI_STREAMING
Bidirectional streaming. Neither aHttpRequestnor aHttpResponseis 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.
-