|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<RejectedNotificationReason>
com.relayrides.pushy.apns.RejectedNotificationReason
public enum RejectedNotificationReason
An enumeration of error codes that may be returned by APNs to indicate why a push notification was rejected. With
the exception of SHUTDOWN
, all rejections are assumed to be permanent failures.
Enum Constant Summary | |
---|---|
INVALID_PAYLOAD_SIZE
|
|
INVALID_TOKEN
|
|
INVALID_TOKEN_SIZE
|
|
INVALID_TOPIC_SIZE
|
|
MISSING_PAYLOAD
|
|
MISSING_TOKEN
|
|
MISSING_TOPIC
|
|
NO_ERROR
|
|
PROCESSING_ERROR
|
|
SHUTDOWN
Indicates that the notification was accepted, but the connection is being shut down for maintenance. |
|
UNKNOWN
|
Method Summary | |
---|---|
static RejectedNotificationReason |
getByErrorCode(byte errorCode)
Gets the rejection reason associated with the given error code. |
byte |
getErrorCode()
Returns the one-byte error code associated with this rejection reason. |
static RejectedNotificationReason |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static RejectedNotificationReason[] |
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, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final RejectedNotificationReason NO_ERROR
public static final RejectedNotificationReason PROCESSING_ERROR
public static final RejectedNotificationReason MISSING_TOKEN
public static final RejectedNotificationReason MISSING_TOPIC
public static final RejectedNotificationReason MISSING_PAYLOAD
public static final RejectedNotificationReason INVALID_TOKEN_SIZE
public static final RejectedNotificationReason INVALID_TOPIC_SIZE
public static final RejectedNotificationReason INVALID_PAYLOAD_SIZE
public static final RejectedNotificationReason INVALID_TOKEN
public static final RejectedNotificationReason SHUTDOWN
Indicates that the notification was accepted, but the connection is being shut down for maintenance. According to Apple's documentation:
A status code of 10 indicates that the APNs server closed the connection (for example, to perform maintenance). The notification identifier in the error response indicates the last notification that was successfully sent. Any notifications you sent after it have been discarded and must be resent. When you receive this status code, stop using this connection and open a new connection.
public static final RejectedNotificationReason UNKNOWN
Method Detail |
---|
public static RejectedNotificationReason[] values()
for (RejectedNotificationReason c : RejectedNotificationReason.values()) System.out.println(c);
public static RejectedNotificationReason valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic byte getErrorCode()
public static RejectedNotificationReason getByErrorCode(byte errorCode)
errorCode
- the error code for which to retrieve a rejection reason
errorCode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |