Package com.wombat.mamda
Class MamdaMultiParticipantManager
- java.lang.Object
-
- com.wombat.mamda.MamdaMultiParticipantManager
-
- All Implemented Interfaces:
MamdaMsgListener
public class MamdaMultiParticipantManager extends java.lang.Object implements MamdaMsgListener
MamdaMultiParticipantManager is a class that manages updates on a consolidated basis for securities that may be traded on multiple exchanges and which may have a national best bid and offer. Developers are notified of each element available for the consolidated security, including the national best bid and offer, and each regional exchange (Market Maker). Developers can pick and choose which elements they wish to provide handling for (e.g., BBO-only, certain regional exchanges, etc.). Specialized Listeners can be added to theMamdaMultiParticipantManagerin response to the callbacks on theMamdaMultiParticipantHandlerbeing invoked. Alternatively, the Listeners can be added up front if the participants are known in advance. Note: theMamdaMultiParticipantManagercan also be used for securities that are not traded on multiple exchanges.
-
-
Constructor Summary
Constructors Constructor Description MamdaMultiParticipantManager(java.lang.String symbol)Only constructor for the class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddConsolidatedListener(MamdaMsgListener listener)Add a specialized message listener (e.g., a MamdaQuoteListener, MamdaTradeListener, etc.) for the consolidated data.voidaddHandler(MamdaMultiParticipantHandler handler)Add a specialized handler for notifications about the multi-participant security.voidaddParticipantListener(MamdaMsgListener listener, java.lang.String partId)Add a specialized message listener (e.g., a MamdaQuoteListener, MamdaTradeListener, etc.) for a participant.voidonMsg(MamdaSubscription subscription, com.wombat.mama.MamaMsg msg, short msgType)Implementation of the MamdaMsgListener Interface.
-
-
-
Method Detail
-
addHandler
public void addHandler(MamdaMultiParticipantHandler handler)
Add a specialized handler for notifications about the multi-participant security.- Parameters:
handler- Concrete instance of the MamdaMultiParticipantHandler interface.
-
addConsolidatedListener
public void addConsolidatedListener(MamdaMsgListener listener)
Add a specialized message listener (e.g., a MamdaQuoteListener, MamdaTradeListener, etc.) for the consolidated data. Multiple listeners can be added.- Parameters:
listener- Concrete instance of the MamdaMsgListener interface.
-
addParticipantListener
public void addParticipantListener(MamdaMsgListener listener, java.lang.String partId)
Add a specialized message listener (e.g., a MamdaQuoteListener, MamdaTradeListener, etc.) for a participant. Multiple listeners for each participant can be added.- Parameters:
listener- Concrete instance of the MamdaMsgListener interface.partId- The participant id for the instrument. This is suffix for the symbol in NYSE Technologies symbology.
-
onMsg
public void onMsg(MamdaSubscription subscription, com.wombat.mama.MamaMsg msg, short msgType)
Implementation of the MamdaMsgListener Interface.- Specified by:
onMsgin interfaceMamdaMsgListener- 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.
-
-