com.wombat.mamda.orderbook
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()
MamdaBasicRecap
getSymbol
in interface MamdaBasicRecap
public java.lang.String getPartId()
MamdaBasicRecap
getPartId
in interface MamdaBasicRecap
public com.wombat.mama.MamaDateTime getSrcTime()
MamdaBasicRecap
getSrcTime
in interface MamdaBasicEvent
getSrcTime
in interface MamdaBasicRecap
public com.wombat.mama.MamaDateTime getActivityTime()
MamdaBasicRecap
getActivityTime
in interface MamdaBasicEvent
getActivityTime
in interface MamdaBasicRecap
public long getEventSeqNum()
getEventSeqNum
in interface MamdaBasicEvent
public com.wombat.mama.MamaDateTime getEventTime()
getEventTime
in interface MamdaBasicEvent
public com.wombat.mama.MamaDateTime getLineTime()
MamdaBasicRecap
getLineTime
in interface MamdaBasicRecap
public com.wombat.mama.MamaDateTime getSendTime()
MamdaBasicRecap
getSendTime
in interface MamdaBasicRecap
public short getMsgQual()
public MamdaOrderBook getOrderBook()
MamdaOrderBookClear
getOrderBook
in interface MamdaOrderBookClear
getOrderBook
in interface MamdaOrderBookRecap
public long getBeginGapSeqNum()
MamdaOrderBookGap
getBeginGapSeqNum
in interface MamdaOrderBookGap
public long getEndGapSeqNum()
MamdaOrderBookGap
getEndGapSeqNum
in interface MamdaOrderBookGap
public void setProcessMarketOrders(boolean process)
public boolean getProcessMarketOrders()
public short getSymbolFieldState()
getSymbolFieldState
in interface MamdaBasicRecap
public short getPartIdFieldState()
getPartIdFieldState
in interface MamdaBasicRecap
public short getSrcTimeFieldState()
MamdaBasicEvent
getSrcTimeFieldState
in interface MamdaBasicEvent
getSrcTimeFieldState
in interface MamdaBasicRecap
public short getActivityTimeFieldState()
MamdaBasicEvent
getActivityTimeFieldState
in interface MamdaBasicEvent
getActivityTimeFieldState
in interface MamdaBasicRecap
public short getLineTimeFieldState()
getLineTimeFieldState
in interface MamdaBasicRecap
public short getSendTimeFieldState()
getSendTimeFieldState
in interface MamdaBasicRecap
public short getEventTimeFieldState()
MamdaBasicEvent
getEventTimeFieldState
in interface MamdaBasicEvent
public short getEventSeqNumFieldState()
MamdaBasicEvent
getEventSeqNumFieldState
in interface MamdaBasicEvent
public 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 MamdaMsgListener
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.Copyright 2007 Wombat Financial Software, Inc.