Package com.wombat.mama
Class MamaSubscriptionState
- java.lang.Object
-
- com.wombat.mama.MamaSubscriptionState
-
public class MamaSubscriptionState extends java.lang.ObjectThis class is the java equivalent of the C subscription state enumeration.
-
-
Field Summary
Fields Modifier and Type Field Description static MamaSubscriptionStateMAMA_SUBSCRIPTION_ACTIVATEDstatic MamaSubscriptionStateMAMA_SUBSCRIPTION_ACTIVATINGstatic MamaSubscriptionStateMAMA_SUBSCRIPTION_ALLOCATEDstatic MamaSubscriptionStateMAMA_SUBSCRIPTION_DEACTIVATEDstatic MamaSubscriptionStateMAMA_SUBSCRIPTION_DEACTIVATINGstatic MamaSubscriptionStateMAMA_SUBSCRIPTION_DEALLOCATEDstatic MamaSubscriptionStateMAMA_SUBSCRIPTION_DEALLOCATINGstatic MamaSubscriptionStateMAMA_SUBSCRIPTION_DESTROYEDstatic MamaSubscriptionStateMAMA_SUBSCRIPTION_DESTROYINGstatic MamaSubscriptionStateMAMA_SUBSCRIPTION_REACTIVATINGstatic MamaSubscriptionStateMAMA_SUBSCRIPTION_SETUPstatic MamaSubscriptionStateMAMA_SUBSCRIPTION_UNKNOWN
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MamaSubscriptionStategetSubscriptionState(int state)This function converts the integer state value to a corresponding MamaSubscriptionState object.intgetValue()Returns the integer representation of the subscription state.static MamaSubscriptionStateparseSubscriptionState(java.lang.String state)This function will return the subscription state corresponding to the supplied string.java.lang.StringtoString()This function returns the string representation of the member state.static java.lang.StringtoString(int state)This function returns the string representation of the state.static java.lang.StringtoString(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:
toStringin classjava.lang.Object- Returns:
- The string representation.
-
-