public enum RejectedNotificationReason extends Enum<RejectedNotificationReason>
SHUTDOWN
, all rejections are assumed to be permanent failures.Enum Constant and Description |
---|
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 |
Modifier and Type | Method and Description |
---|---|
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.
|
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
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 nameNullPointerException
- if the argument is nullpublic byte getErrorCode()
public static RejectedNotificationReason getByErrorCode(byte errorCode)
errorCode
- the error code for which to retrieve a rejection reasonerrorCode
Copyright © 2013–2015 RelayRides. All rights reserved.