com.notnoop.apns
Enum DeliveryError

java.lang.Object
  extended by java.lang.Enum<DeliveryError>
      extended by com.notnoop.apns.DeliveryError
All Implemented Interfaces:
Serializable, Comparable<DeliveryError>

public enum DeliveryError
extends Enum<DeliveryError>

Errors in delivery that may get reported by Apple APN servers


Enum Constant Summary
INVALID_PAYLOAD_SIZE
           
INVALID_TOKEN
           
INVALID_TOKEN_SIZE
           
INVALID_TOPIC_SIZE
           
MISSING_DEVICE_TOKEN
           
MISSING_PAYLOAD
           
MISSING_TOPIC
           
NO_ERROR
          Connection closed without any error.
NONE
           
PROCESSING_ERROR
           
UNKNOWN
           
 
Method Summary
 int code()
          The status code as specified by Apple
static DeliveryError ofCode(int code)
          Returns the appropriate DeliveryError enum corresponding to the Apple provided status code
static DeliveryError valueOf(String name)
          Returns the enum constant of this type with the specified name.
static DeliveryError[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NO_ERROR

public static final DeliveryError NO_ERROR
Connection closed without any error. This may occur if the APN service faces an invalid simple APNS notification while running in enhanced mode


PROCESSING_ERROR

public static final DeliveryError PROCESSING_ERROR

MISSING_DEVICE_TOKEN

public static final DeliveryError MISSING_DEVICE_TOKEN

MISSING_TOPIC

public static final DeliveryError MISSING_TOPIC

MISSING_PAYLOAD

public static final DeliveryError MISSING_PAYLOAD

INVALID_TOKEN_SIZE

public static final DeliveryError INVALID_TOKEN_SIZE

INVALID_TOPIC_SIZE

public static final DeliveryError INVALID_TOPIC_SIZE

INVALID_PAYLOAD_SIZE

public static final DeliveryError INVALID_PAYLOAD_SIZE

INVALID_TOKEN

public static final DeliveryError INVALID_TOKEN

NONE

public static final DeliveryError NONE

UNKNOWN

public static final DeliveryError UNKNOWN
Method Detail

values

public static DeliveryError[] 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 (DeliveryError c : DeliveryError.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static DeliveryError 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 name
NullPointerException - if the argument is null

code

public int code()
The status code as specified by Apple


ofCode

public static DeliveryError ofCode(int code)
Returns the appropriate DeliveryError enum corresponding to the Apple provided status code

Parameters:
code - status code provided by Apple
Returns:
the appropriate DeliveryError


Copyright © 2013. All Rights Reserved.