Package com.eatthepath.pushy.apns
Enum DeliveryPriority
- All Implemented Interfaces:
Serializable
,Comparable<DeliveryPriority>
,java.lang.constant.Constable
An enumeration of delivery priorities for APNs push notifications. Note that this priority affects when the
notification may be delivered to the receiving device by the APNs gateway and does not affect when the
notification will be sent to the gateway itself.
- Since:
- 0.4
- Author:
- Jon Chambers
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionIndicates that the APNs server should attempt to deliver a notification "at a time that conserves power on the device receiving it."Indicates that the APNs server should attempt to deliver a notification immediately. -
Method Summary
Modifier and TypeMethodDescriptionint
getCode()
static DeliveryPriority
getFromCode
(int code) static DeliveryPriority
Returns the enum constant of this type with the specified name.static DeliveryPriority[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
IMMEDIATE
Indicates that the APNs server should attempt to deliver a notification immediately. Additionally, according to Apple's documentation:
The push notification must trigger an alert, sound, or badge on the device. It is an error to use this priority for a push that contains only the
content-available
key. -
CONSERVE_POWER
Indicates that the APNs server should attempt to deliver a notification "at a time that conserves power on the device receiving it."
-
-
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
-
getCode
public int getCode() -
getFromCode
-