Class MamaMdMsgType


  • public final class MamaMdMsgType
    extends java.lang.Object
    This 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.
    • Method Detail

      • toString

        public java.lang.String toString()
        Returns the stringified name for the enumerated type.
        Overrides:
        toString in class java.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.