public class MotifTrade extends Object
Top level trade object used within the Integration API which all trade objects should extend.
The MotifTrade wraps around the Trade object from the underlying trading datasource library, and provides convenience methods to obtain fields and send messages.
Modifier and Type | Field and Description |
---|---|
protected com.caplin.trading.Trade |
trade |
Constructor and Description |
---|
MotifTrade(com.caplin.trading.Trade trade)
Constructs a MotifTrade that wraps around the
trade object and provides convenience methods.
|
Modifier and Type | Method and Description |
---|---|
com.caplin.trading.TradeEvent |
createEvent(String eventName) |
String |
getCurrentState()
Returns the current state name as defined in the state model xml
that the trade is in.
|
String |
getField(String fieldName)
Returns the field value with the specified field name.
|
String |
getRequestID()
Returns the ID generated from the client.
|
String |
getTradeChannelSubject()
Returns the subject of the trade channel that this trade was created on.
|
String |
getUsername()
Returns the username of the logged in user that created this trade.
|
void |
sendEvent(com.caplin.trading.TradeEvent event) |
String |
toString() |
public MotifTrade(com.caplin.trading.Trade trade)
trade
- The trade object that the MotifTrade wraps aroundpublic String getRequestID()
public String getUsername()
public String getTradeChannelSubject()
public String getCurrentState()
public String getField(String fieldName)
fieldName
- The name of the field.public com.caplin.trading.TradeEvent createEvent(String eventName) throws com.caplin.trading.TradeException
com.caplin.trading.TradeException
public void sendEvent(com.caplin.trading.TradeEvent event) throws com.caplin.trading.TradeException
com.caplin.trading.TradeException
Copyright © 2015 Caplin Systems.