Enum SubscriptionOption
- java.lang.Object
-
- java.lang.Enum<SubscriptionOption>
-
- com.linecorp.armeria.common.stream.SubscriptionOption
-
- All Implemented Interfaces:
Serializable
,Comparable<SubscriptionOption>
public enum SubscriptionOption extends Enum<SubscriptionOption>
Options used when subscribing to aStreamMessage
.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description NOTIFY_CANCELLATION
To get notified bySubscriber.onError(Throwable)
even when theStreamMessage
is cancelled.WITH_POOLED_OBJECTS
To receive the pooledByteBuf
andByteBufHolder
as is, without making a copy.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SubscriptionOption
valueOf(String name)
Returns the enum constant of this type with the specified name.static SubscriptionOption[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
WITH_POOLED_OBJECTS
public static final SubscriptionOption WITH_POOLED_OBJECTS
To receive the pooledByteBuf
andByteBufHolder
as is, without making a copy. If you don't know what this means, do not specify this when you subscribe theStreamMessage
.
-
NOTIFY_CANCELLATION
public static final SubscriptionOption NOTIFY_CANCELLATION
To get notified bySubscriber.onError(Throwable)
even when theStreamMessage
is cancelled.
-
-
Method Detail
-
values
public static SubscriptionOption[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SubscriptionOption c : SubscriptionOption.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SubscriptionOption valueOf(String name)
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
-
-