Package com.wombat.mama
Class MamaMdMsgType
- java.lang.Object
-
- com.wombat.mama.MamaMdMsgType
-
public final class MamaMdMsgType extends java.lang.ObjectThis class provides an enumeration of types and methods for MAMA types related to market data applications. It is intended that the types in this class will ultimately replace the MamaMsgType as an indicator of the type of market data message received by a subscribing application.
-
-
Field Summary
Fields Modifier and Type Field Description static MamaMdMsgTypeBOOK_INITIALstatic intBOOK_INITIAL_VALUEOrder book initial valuestatic MamaMdMsgTypeCANCELstatic intCANCEL_VALUETrade Cancellationstatic MamaMdMsgTypeCLOSINGstatic intCLOSING_VALUEClosing summarystatic MamaMdMsgTypeCORRECTIONstatic intCORRECTION_VALUETrade correctionstatic MamaMdMsgTypeERRORstatic intERROR_VALUETrade Errorstatic MamaMdMsgTypeIMBALANCEstatic intIMBALANCE_VALUEOrder imbalance or noimbalance updatestatic MamaMdMsgTypeMISCstatic intMISC_VALUEMiscellaneous.static MamaMdMsgTypePREOPENINGstatic intPREOPENING_VALUEPre-opening summary (e.g.static MamaMdMsgTypeQUOTEstatic intQUOTE_VALUEQuote update.static MamaMdMsgTypeSECURITY_STATUSstatic intSECURITY_STATUS_VALUESecurity status updatestatic MamaMdMsgTypeSYMBOL_ACTIONstatic intSYMBOL_ACTION_VALUEAction related to this symbol, such as a name change or symbol deletion due to option/future expiration, etc.static MamaMdMsgTypeTRADEstatic intTRADE_VALUETrade Update
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static shortcompatMsgType(MamaMdMsgType mdMsgType)Return the corresponding MamaMsgType for the specified MamaMdMsgType.static MamaMdMsgTypeenumObjectForValue(int value)Return an instance of a MamaMdMsgType corresponding to the specified integer value.booleanequals(MamaMdMsgType appDataType)Compare the two types for equality.intgetValue()Returns the integer value for the type.static java.lang.StringstringForMsg(MamaMsg msg)The stringified name of the type based on the int value for the type in the specified message.java.lang.StringtoString()Returns the stringified name for the enumerated type.static MamaMdMsgTypetypeForMsg(MamaMsg msg)Get the md msg type from the specified MamaMsg.static java.lang.StringvalueToString(int value)Utility method for mapping type integer values to corresponding string values.
-
-
-
Field Detail
-
CANCEL_VALUE
public static final int CANCEL_VALUE
Trade Cancellation- See Also:
- Constant Field Values
-
CANCEL
public static final MamaMdMsgType CANCEL
-
ERROR_VALUE
public static final int ERROR_VALUE
Trade Error- See Also:
- Constant Field Values
-
ERROR
public static final MamaMdMsgType ERROR
-
CORRECTION_VALUE
public static final int CORRECTION_VALUE
Trade correction- See Also:
- Constant Field Values
-
CORRECTION
public static final MamaMdMsgType CORRECTION
-
CLOSING_VALUE
public static final int CLOSING_VALUE
Closing summary- See Also:
- Constant Field Values
-
CLOSING
public static final MamaMdMsgType CLOSING
-
SYMBOL_ACTION_VALUE
public static final int SYMBOL_ACTION_VALUE
Action related to this symbol, such as a name change or symbol deletion due to option/future expiration, etc.- See Also:
- Constant Field Values
-
SYMBOL_ACTION
public static final MamaMdMsgType SYMBOL_ACTION
-
PREOPENING_VALUE
public static final int PREOPENING_VALUE
Pre-opening summary (e.g. morning roll)- See Also:
- Constant Field Values
-
PREOPENING
public static final MamaMdMsgType PREOPENING
-
QUOTE_VALUE
public static final int QUOTE_VALUE
Quote update.- See Also:
- Constant Field Values
-
QUOTE
public static final MamaMdMsgType QUOTE
-
TRADE_VALUE
public static final int TRADE_VALUE
Trade Update- See Also:
- Constant Field Values
-
TRADE
public static final MamaMdMsgType TRADE
-
BOOK_INITIAL_VALUE
public static final int BOOK_INITIAL_VALUE
Order book initial value- See Also:
- Constant Field Values
-
BOOK_INITIAL
public static final MamaMdMsgType BOOK_INITIAL
-
IMBALANCE_VALUE
public static final int IMBALANCE_VALUE
Order imbalance or noimbalance update- See Also:
- Constant Field Values
-
IMBALANCE
public static final MamaMdMsgType IMBALANCE
-
SECURITY_STATUS_VALUE
public static final int SECURITY_STATUS_VALUE
Security status update- See Also:
- Constant Field Values
-
SECURITY_STATUS
public static final MamaMdMsgType SECURITY_STATUS
-
MISC_VALUE
public static final int MISC_VALUE
Miscellaneous.- See Also:
- Constant Field Values
-
MISC
public static final MamaMdMsgType MISC
-
-
Method Detail
-
toString
public java.lang.String toString()
Returns the stringified name for the enumerated type.- Overrides:
toStringin classjava.lang.Object- Returns:
- Name for the type.
-
getValue
public int getValue()
Returns the integer value for the type. This value can be used in switch statements against the public XXX_VALUE static members of the class.- Returns:
- The integer type.
-
equals
public boolean equals(MamaMdMsgType appDataType)
Compare the two types for equality. Returns true if the integer value of both types is equal. Otherwise returns false.- Parameters:
appDataType- The object to check equality against.- Returns:
- Whether the two objects are equal.
-
typeForMsg
public static MamaMdMsgType typeForMsg(MamaMsg msg)
Get the md msg type from the specified MamaMsg. Returns null if no type was found in the message.- Parameters:
msg- The MamaMsg from which the msg type will be extracted.- Returns:
- An instance of a MamaMdMsgType
-
stringForMsg
public static java.lang.String stringForMsg(MamaMsg msg)
The stringified name of the type based on the int value for the type in the specified message.- Parameters:
msg- The MamaMsg from which the type is to be extracted.- Returns:
- The string name for the type.
-
compatMsgType
public static short compatMsgType(MamaMdMsgType mdMsgType)
Return the corresponding MamaMsgType for the specified MamaMdMsgType. Mainly for backwards compatibility.- Parameters:
mdMsgType- The MamaMdMsgType for which a mapping is required.- Returns:
- The MamaMsgType corresponding to the specified MamaMdMsgType.
-
valueToString
public static java.lang.String valueToString(int value)
Utility method for mapping type integer values to corresponding string values. Returns "UNKNOWN" is the int type value is not recognised.- Parameters:
value- The int value for a MamaMdMsgType.- Returns:
- The string name value of the specified MamaMdMsgType integer value.
-
enumObjectForValue
public static MamaMdMsgType enumObjectForValue(int value)
Return an instance of a MamaMdMsgType corresponding to the specified integer value. Returns null if the integer value is not recognised.- Parameters:
value- Int value for a MamaMdMsgType.- Returns:
- Instance of a MamaMdMsgType if a mapping exists.
-
-