net.rim.pushsdk.pap
Enum MessageState

java.lang.Object
  extended by java.lang.Enum<MessageState>
      extended by net.rim.pushsdk.pap.MessageState
All Implemented Interfaces:
Serializable, Comparable<MessageState>

public enum MessageState
extends Enum<MessageState>

PAP message state constants.

Author:
dstrelbytsky

Enum Constant Summary
ABORTED
          Aborted indicates that the client aborted the message.
CANCELLED
          Cancelled indicates that the message was successfully cancelled through the cancel operation.
DELIVERED
          Delivered indicates the message was successfully delivered to the specified address.
EXPIRED
          Expired indicates that the message's time to live has passed before reaching a final state and therefore was not delivered.
PENDING
          Pending indicates the message has been accepted for processing but is not yet in a final state.
REJECTED
          Rejected indicates that the message was not accepted by the PPG.
TIMEOUT
          Timeout indicates that the delivery process timed out.
UNDELIVERABLE
          Undeliverable indicates that the message could not be delivered for various reasons (e.g.
UNKNOWN
          Unknown indicates that the state of the push can not be determined.
 
Method Summary
static MessageState getMessageState(String stateString)
          Gets the message state corresponding to the given string.
 String toString()
          Gets the message state as a string in lower case.
static MessageState valueOf(String name)
          Returns the enum constant of this type with the specified name.
static MessageState[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

REJECTED

public static final MessageState REJECTED
Rejected indicates that the message was not accepted by the PPG.

Note: As of version 1.1 of the SDK, this message state is not supported by the public (BIS) PPG.


PENDING

public static final MessageState PENDING
Pending indicates the message has been accepted for processing but is not yet in a final state.


DELIVERED

public static final MessageState DELIVERED
Delivered indicates the message was successfully delivered to the specified address.


UNDELIVERABLE

public static final MessageState UNDELIVERABLE
Undeliverable indicates that the message could not be delivered for various reasons (e.g. an invalid address).


EXPIRED

public static final MessageState EXPIRED
Expired indicates that the message's time to live has passed before reaching a final state and therefore was not delivered.


ABORTED

public static final MessageState ABORTED
Aborted indicates that the client aborted the message.

Note: As of version 1.1 of the SDK, this message state is not supported by the public (BIS) PPG.


TIMEOUT

public static final MessageState TIMEOUT
Timeout indicates that the delivery process timed out.

Note: As of version 1.1 of the SDK ,this message state is not supported by the public (BIS) PPG.


CANCELLED

public static final MessageState CANCELLED
Cancelled indicates that the message was successfully cancelled through the cancel operation.


UNKNOWN

public static final MessageState UNKNOWN
Unknown indicates that the state of the push can not be determined.

Method Detail

values

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

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

valueOf

public static MessageState 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

getMessageState

public static MessageState getMessageState(String stateString)
Gets the message state corresponding to the given string.

Parameters:
stateString - a message state as a string
Returns:
the matching message state

toString

public String toString()
Gets the message state as a string in lower case.

Overrides:
toString in class Enum<MessageState>
Returns:
the message state as a lower case string


Copyright © 2011 Research In Motion. All Rights Reserved.