This package contains classes to facilitate in the restoration of Trade
s.
This will occur when the server sends a specific message to restore a particular
trade. There are two scenarios that can occur on the client side.
Since the trade exists in the first scenario, any object that wishes to listen for trade restoration events should add a listener directly to the Trade using caplin.trading.trademodel.Trade#addTradeRestoredListener.
For the second scenario, listeners can be added to the TradeService
class
using caplin.trading.service.TradeService#addTradeRestoredListener. Note that
the caplin.trading.restoration.TradeRestoreEvent#getTrade method will return null
when the caplin.trading.restoration.TradeRestoredListener#beforeTradeRestored event
is fired in this case, since the trade object won't be created yet.
beforeTradeRestored()
fired caplin.trading.restoration.TradeRestoredListeners
tradeRestored()
fired caplin.trading.restoration.TradeRestoredListeners
structureChanged()
fired on caplin.trading.trademodel.StructureChangedListeners
dataFieldChanged()
fired on caplin.trading.trademodel.DataFieldChangedListeners
Currently the Java Trading Data Source library can only send 1 leg addition at a time. Therefore when the trade is restored it will have at most 1 leg. If the trade already exists on the client and contains more than 1 leg before restoration, all legs except the restored leg will be removed. It is up to the implementors of the Trading Data Source library to add additional legs via another state change if they are required for the trade.
Attributes | Name and Description |
---|---|
|
caplin.trading.restoration()
|
►
caplin.trading.restoration()