public class MamdaOrderBookListener extends java.lang.Object implements MamdaMsgListener, MamdaOrderBookClear, MamdaOrderBookRecap, MamdaOrderBookGap
| Constructor and Description |
|---|
MamdaOrderBookListener()
Create an order book listener using internally created data
structures for the full and delta order books.
|
MamdaOrderBookListener(MamdaOrderBook fullBook)
Create an order book listener using an optional user-provided
object for the full order book.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addHandler(MamdaOrderBookHandler handler)
Add a specialized order book handler.
|
void |
addIgnoreEntryId(java.lang.String id)
Add an entry ID to ignore.
|
void |
clear()
Clear all cached data fields.
|
com.wombat.mama.MamaDateTime |
getActivityTime()
Activity time.
|
short |
getActivityTimeFieldState()
return Activity time Field State
MODIFIED (2) value indicates the fied was updated in last tick
NOT MODIFIED (1) value indicate that there was no change in the last tick
NOT_INITIALISED (0) value indicates that the field has never been updated
|
long |
getBeginGapSeqNum()
Beginning sequence number in a detected gap event.
|
MamdaOrderBook |
getBookSnapshot()
Returns a deep, writeable copy of the underlying order book.
|
static MamdaOrderBook |
getBookSnapShot(java.lang.String symbol) |
long |
getEndGapSeqNum()
Ending sequence number in a detected gap event.
|
long |
getEventSeqNum() |
short |
getEventSeqNumFieldState()
return source sequence number Field State
MODIFIED (2) value indicates the fied was updated in last tick
NOT MODIFIED (1) value indicate that there was no change in the last tick
NOT_INITIALISED (0) value indicates that the field has never been updated
|
com.wombat.mama.MamaDateTime |
getEventTime() |
short |
getEventTimeFieldState()
return event time Field State
MODIFIED (2) value indicates the fied was updated in last tick
NOT MODIFIED (1) value indicate that there was no change in the last tick
NOT_INITIALISED (0) value indicates that the field has never been updated
|
com.wombat.mama.MamaDateTime |
getLineTime()
Get the line time of the update.
|
short |
getLineTimeFieldState() |
short |
getMsgQual() |
MamdaOrderBook |
getOrderBook()
Returns the full orderbook related to this clear event.
|
java.lang.String |
getPartId()
Get the participant identifier.
|
short |
getPartIdFieldState() |
boolean |
getProcessMarketOrders() |
MamdaOrderBook |
getReadOnlyBookSnapshot()
Returns a deep, read only, copy of the underlying order book.
|
com.wombat.mama.MamaDateTime |
getSendTime()
Get the send time of the update.
|
short |
getSendTimeFieldState() |
com.wombat.mama.MamaDateTime |
getSrcTime()
Source time.
|
short |
getSrcTimeFieldState()
return Source time Field State
MODIFIED (2) value indicates the fied was updated in last tick
NOT MODIFIED (1) value indicate that there was no change in the last tick
NOT_INITIALISED (0) value indicates that the field has never been updated
|
java.lang.String |
getSymbol()
Get the string symbol for the instrument.
|
short |
getSymbolFieldState() |
void |
onMsg(MamdaSubscription subscription,
com.wombat.mama.MamaMsg msg,
short msgType)
Implementation of MamdaListener interface.
|
void |
removeIgnoreEntryId(java.lang.String id)
Remove an entry ID to ignore.
|
void |
setProcessEntries(boolean process)
Set whether we are interested in "entry level" information at
all.
|
void |
setProcessMarketOrders(boolean process) |
public MamdaOrderBookListener()
public MamdaOrderBookListener(MamdaOrderBook fullBook)
fullBook - The MamdaOrderBook used to maintain the full book.public void addHandler(MamdaOrderBookHandler handler)
handler - The hadler registered to receive order book update
callbacks.public void addIgnoreEntryId(java.lang.String id)
id - The id of the participant to ignore when process book
updates.public void removeIgnoreEntryId(java.lang.String id)
id - The id of the participant whose update will be subsequently
processed as part of the book.addIgnoreEntryId(String)public void clear()
public java.lang.String getSymbol()
MamdaBasicRecapgetSymbol in interface MamdaBasicRecappublic java.lang.String getPartId()
MamdaBasicRecapgetPartId in interface MamdaBasicRecappublic com.wombat.mama.MamaDateTime getSrcTime()
MamdaBasicRecapgetSrcTime in interface MamdaBasicEventgetSrcTime in interface MamdaBasicRecappublic com.wombat.mama.MamaDateTime getActivityTime()
MamdaBasicRecapgetActivityTime in interface MamdaBasicEventgetActivityTime in interface MamdaBasicRecappublic long getEventSeqNum()
getEventSeqNum in interface MamdaBasicEventpublic com.wombat.mama.MamaDateTime getEventTime()
getEventTime in interface MamdaBasicEventpublic com.wombat.mama.MamaDateTime getLineTime()
MamdaBasicRecapgetLineTime in interface MamdaBasicRecappublic com.wombat.mama.MamaDateTime getSendTime()
MamdaBasicRecapgetSendTime in interface MamdaBasicRecappublic short getMsgQual()
public MamdaOrderBook getOrderBook()
MamdaOrderBookCleargetOrderBook in interface MamdaOrderBookCleargetOrderBook in interface MamdaOrderBookRecappublic long getBeginGapSeqNum()
MamdaOrderBookGapgetBeginGapSeqNum in interface MamdaOrderBookGappublic long getEndGapSeqNum()
MamdaOrderBookGapgetEndGapSeqNum in interface MamdaOrderBookGappublic void setProcessMarketOrders(boolean process)
public boolean getProcessMarketOrders()
public short getSymbolFieldState()
getSymbolFieldState in interface MamdaBasicRecappublic short getPartIdFieldState()
getPartIdFieldState in interface MamdaBasicRecappublic short getSrcTimeFieldState()
MamdaBasicEventgetSrcTimeFieldState in interface MamdaBasicEventgetSrcTimeFieldState in interface MamdaBasicRecappublic short getActivityTimeFieldState()
MamdaBasicEventgetActivityTimeFieldState in interface MamdaBasicEventgetActivityTimeFieldState in interface MamdaBasicRecappublic short getLineTimeFieldState()
getLineTimeFieldState in interface MamdaBasicRecappublic short getSendTimeFieldState()
getSendTimeFieldState in interface MamdaBasicRecappublic short getEventTimeFieldState()
MamdaBasicEventgetEventTimeFieldState in interface MamdaBasicEventpublic short getEventSeqNumFieldState()
MamdaBasicEventgetEventSeqNumFieldState in interface MamdaBasicEventpublic void setProcessEntries(boolean process)
process - Whether to process entries in books.public MamdaOrderBook getBookSnapshot()
public static MamdaOrderBook getBookSnapShot(java.lang.String symbol)
public MamdaOrderBook getReadOnlyBookSnapshot()
public void onMsg(MamdaSubscription subscription, com.wombat.mama.MamaMsg msg, short msgType)
onMsg in interface MamdaMsgListenersubscription - 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.Copyright 2007 Wombat Financial Software, Inc.