net.rim.pushsdk.query.subscription
Enum SubQueryResultStatus

java.lang.Object
  extended by java.lang.Enum<SubQueryResultStatus>
      extended by net.rim.pushsdk.query.subscription.SubQueryResultStatus
All Implemented Interfaces:
Serializable, Comparable<SubQueryResultStatus>

public enum SubQueryResultStatus
extends Enum<SubQueryResultStatus>

Represents the status of a result back from a subscription query message to the PPG.

Author:
mdandrea

Enum Constant Summary
ACTIVE
          An active status - the user is actively subscribed.
SUSPENDED
          A suspended status.
UNKNOWN
          An unknown/"does not exist" status - this user subscription is unknown to the PPG.
UNSUBSCRIBED
          An unsubscribed/inactive status - the user was previously subscribed but is currently unsubscribed.
 
Method Summary
 String getSubQueryResultStatus()
          Gets the value of the status (lower cased).
static SubQueryResultStatus getSubQueryResultStatus(String status)
          Gets the status associated with the given string.
 String toString()
          Calls getSubQueryResultStatus().
static SubQueryResultStatus valueOf(String name)
          Returns the enum constant of this type with the specified name.
static SubQueryResultStatus[] 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

ACTIVE

public static final SubQueryResultStatus ACTIVE
An active status - the user is actively subscribed.


SUSPENDED

public static final SubQueryResultStatus SUSPENDED
A suspended status. The push initiator has the option to suspend an active user at their discretion using the suspend API. The user's subscription is set to suspended in this case.


UNSUBSCRIBED

public static final SubQueryResultStatus UNSUBSCRIBED
An unsubscribed/inactive status - the user was previously subscribed but is currently unsubscribed. This state can occur if the channel is destroyed from the device side, if the user uninstalls the application, if the SIM card was changed on the device or if the push initiator calls the unsubscribe API.


UNKNOWN

public static final SubQueryResultStatus UNKNOWN
An unknown/"does not exist" status - this user subscription is unknown to the PPG. This may happen is the user never previously subscribed successfully.

Method Detail

values

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

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

valueOf

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

getSubQueryResultStatus

public String getSubQueryResultStatus()
Gets the value of the status (lower cased).

Returns:
the status

getSubQueryResultStatus

public static SubQueryResultStatus getSubQueryResultStatus(String status)
Gets the status associated with the given string.

Parameters:
status - the status as a string (case insensitive)
Returns:
the status
Throws:
IllegalArgumentException - if the status string passed in was invalid

toString

public String toString()
Calls getSubQueryResultStatus().

Overrides:
toString in class Enum<SubQueryResultStatus>


Send feedback

Copyright © 2013 BlackBerry. All rights reserved.