Package com.wombat.mama
Class MamaSubscriptionState
- java.lang.Object
-
- com.wombat.mama.MamaSubscriptionState
-
public class MamaSubscriptionState extends java.lang.Object
This class is the java equivalent of the C subscription state enumeration.
-
-
Field Summary
Fields Modifier and Type Field Description static MamaSubscriptionState
MAMA_SUBSCRIPTION_ACTIVATED
static MamaSubscriptionState
MAMA_SUBSCRIPTION_ACTIVATING
static MamaSubscriptionState
MAMA_SUBSCRIPTION_ALLOCATED
static MamaSubscriptionState
MAMA_SUBSCRIPTION_DEACTIVATED
static MamaSubscriptionState
MAMA_SUBSCRIPTION_DEACTIVATING
static MamaSubscriptionState
MAMA_SUBSCRIPTION_DEALLOCATED
static MamaSubscriptionState
MAMA_SUBSCRIPTION_DEALLOCATING
static MamaSubscriptionState
MAMA_SUBSCRIPTION_DESTROYED
static MamaSubscriptionState
MAMA_SUBSCRIPTION_DESTROYING
static MamaSubscriptionState
MAMA_SUBSCRIPTION_REACTIVATING
static MamaSubscriptionState
MAMA_SUBSCRIPTION_SETUP
static MamaSubscriptionState
MAMA_SUBSCRIPTION_UNKNOWN
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MamaSubscriptionState
getSubscriptionState(int state)
This function converts the integer state value to a corresponding MamaSubscriptionState object.int
getValue()
Returns the integer representation of the subscription state.static MamaSubscriptionState
parseSubscriptionState(java.lang.String state)
This function will return the subscription state corresponding to the supplied string.java.lang.String
toString()
This function returns the string representation of the member state.static java.lang.String
toString(int state)
This function returns the string representation of the state.static java.lang.String
toString(MamaSubscriptionState state)
This function returns the string representation of the state.
-
-
-
Field Detail
-
MAMA_SUBSCRIPTION_UNKNOWN
public static final MamaSubscriptionState MAMA_SUBSCRIPTION_UNKNOWN
-
MAMA_SUBSCRIPTION_ALLOCATED
public static final MamaSubscriptionState MAMA_SUBSCRIPTION_ALLOCATED
-
MAMA_SUBSCRIPTION_SETUP
public static final MamaSubscriptionState MAMA_SUBSCRIPTION_SETUP
-
MAMA_SUBSCRIPTION_ACTIVATING
public static final MamaSubscriptionState MAMA_SUBSCRIPTION_ACTIVATING
-
MAMA_SUBSCRIPTION_ACTIVATED
public static final MamaSubscriptionState MAMA_SUBSCRIPTION_ACTIVATED
-
MAMA_SUBSCRIPTION_DEACTIVATING
public static final MamaSubscriptionState MAMA_SUBSCRIPTION_DEACTIVATING
-
MAMA_SUBSCRIPTION_DEACTIVATED
public static final MamaSubscriptionState MAMA_SUBSCRIPTION_DEACTIVATED
-
MAMA_SUBSCRIPTION_DESTROYING
public static final MamaSubscriptionState MAMA_SUBSCRIPTION_DESTROYING
-
MAMA_SUBSCRIPTION_DESTROYED
public static final MamaSubscriptionState MAMA_SUBSCRIPTION_DESTROYED
-
MAMA_SUBSCRIPTION_DEALLOCATING
public static final MamaSubscriptionState MAMA_SUBSCRIPTION_DEALLOCATING
-
MAMA_SUBSCRIPTION_DEALLOCATED
public static final MamaSubscriptionState MAMA_SUBSCRIPTION_DEALLOCATED
-
MAMA_SUBSCRIPTION_REACTIVATING
public static final MamaSubscriptionState MAMA_SUBSCRIPTION_REACTIVATING
-
-
Method Detail
-
getValue
public int getValue()
Returns the integer representation of the subscription state.- Returns:
- The state as an integer.
-
getSubscriptionState
public static MamaSubscriptionState getSubscriptionState(int state)
This function converts the integer state value to a corresponding MamaSubscriptionState object.- Parameters:
state
- The state.- Returns:
- To return the MamaSusbscriptionState instance.
-
parseSubscriptionState
public static MamaSubscriptionState parseSubscriptionState(java.lang.String state)
This function will return the subscription state corresponding to the supplied string. Note that if the string is not recognised then MAMA_SUBSCRIPTION_UNKNOWN will be returned.- Parameters:
state
-- Returns:
- The corresponding state object or MAMA_SUBSCRIPTION_UNKNOWN if the string isn't recognised.
-
toString
public static java.lang.String toString(int state)
This function returns the string representation of the state.- Parameters:
state
- The state.- Returns:
- The string representation.
-
toString
public static java.lang.String toString(MamaSubscriptionState state)
This function returns the string representation of the state.- Parameters:
state
- The state.- Returns:
- The string representation.
-
toString
public java.lang.String toString()
This function returns the string representation of the member state.- Overrides:
toString
in classjava.lang.Object
- Returns:
- The string representation.
-
-