Class MamdaMultiSecurityManager

  • All Implemented Interfaces:
    MamdaMsgListener

    public class MamdaMultiSecurityManager
    extends java.lang.Object
    implements MamdaMsgListener
    MamdaMultiSecurityManager is a class that manages updates on a group symbol which provides a single subscription to multiple different securities. Developers are notified of each element available for the group and can choose which elements they wish to provide handling for (e.g. based on wildcards). Specialized Listeners can be added to the MamdaMultiSecurityManager in response to the callbacks on the MamdaMultiSecurityHandler being invoked. Alternatively, the Listeners can be added up front if the participants are known in advance.
    • Constructor Summary

      Constructors 
      Constructor Description
      MamdaMultiSecurityManager​(java.lang.String symbol)
      Only constructor for the class.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addHandler​(MamdaMultiSecurityHandler handler)
      Add a specialized handler for notifications about new securities.
      void addListener​(MamdaMsgListener listener, java.lang.String symbol)
      Add a specialized message listener (e.g.
      void onMsg​(MamdaSubscription subscription, com.wombat.mama.MamaMsg msg, short msgType)
      Implementation of the MamdaMsgListener Interface.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MamdaMultiSecurityManager

        public MamdaMultiSecurityManager​(java.lang.String symbol)
        Only constructor for the class. No default available.
        Parameters:
        symbol - The group symbol for which the corresponding subscription was created.
    • Method Detail

      • addHandler

        public void addHandler​(MamdaMultiSecurityHandler handler)
        Add a specialized handler for notifications about new securities.
        Parameters:
        handler - Concrete instance of the MamdaMultiSecurityHandler interface.
      • addListener

        public void addListener​(MamdaMsgListener listener,
                                java.lang.String symbol)
        Add a specialized message listener (e.g. a MamdaQuoteListener, MamdaTradeListener, etc.) for a security. Multiple listeners for each security can be added.
        Parameters:
        listener - Concrete instance of the MamdaMsgListener interface.
        symbol - The symbol for the instrument.
      • onMsg

        public void onMsg​(MamdaSubscription subscription,
                          com.wombat.mama.MamaMsg msg,
                          short msgType)
        Implementation of the MamdaMsgListener Interface.
        Specified by:
        onMsg in interface MamdaMsgListener
        Parameters:
        subscription - The MamdaSubscription to which this listener was registered.
        msg - The MamaMsg received by the underlying MAMA API and which resulted in this callback being invoked.
        msgType - The message type. e.g. INITIAL, RECAP, UPDATE etc.