public class ActivityBlotterService
extends java.lang.Object
implements com.caplin.datasource.blotter.BlotterApplicationListener
- a request occurs when the user logs in and selects the activity blotter - a discard occurs when the blotter is no longer required by the user - deal updates are triggered after a deal is submitted (for example, the deal changes from 'Submitted' to 'Accepted')
The activity blotter is a session blotter, so updates outside of a user being logged in and having established a channel can safely be ignored.
+----------+ +----------------------+ +-------------------+ |(Blotters)| |ActivityBlotterService| |BlotterDataExtractor| +-----+----+ +----------+-----------+ +---------+---------+ | | | | | | | blotterChannelOpened | | +--------------------->| | | | | | | updateDeal | | |<----------------------| | | | | sendBlotterItem | | |<---------------------| | | | | | | | | | | | | | | blotterChannelClosed | | +--------------------->| | v v v
The ActivityBlotterService gets its data from one of the the BlotterDataProviders, which in turn are updated by a combination of the FX API, as the trade progresses through the trade model states, and TrAPI.
- (concurrent) stores currently in-use channels in a concurrent map - (longlife) alive continually
Constructor and Description |
---|
ActivityBlotterService(BlotterItemFactory factory) |
Modifier and Type | Method and Description |
---|---|
void |
blotterChannelClosed(com.caplin.datasource.blotter.BlotterChannel channel)
Called once when the activity blotter is discarded by the user.
|
void |
blotterChannelOpened(com.caplin.datasource.blotter.BlotterChannel channel)
Called once when the activity blotter is subscribed to by the user.
|
void |
updateDeal(java.lang.String user,
java.lang.String dealId,
java.util.Map<java.lang.String,java.lang.String> fields)
Called by us whenever the state of a deal changes (notified by the FX API).
|
@Inject public ActivityBlotterService(BlotterItemFactory factory)
public void blotterChannelOpened(com.caplin.datasource.blotter.BlotterChannel channel)
This method is called automatically by the blotter api.
blotterChannelOpened
in interface com.caplin.datasource.blotter.BlotterApplicationListener
public void blotterChannelClosed(com.caplin.datasource.blotter.BlotterChannel channel)
This method is called automatically by the blotter api.
blotterChannelClosed
in interface com.caplin.datasource.blotter.BlotterApplicationListener
public void updateDeal(java.lang.String user, java.lang.String dealId, java.util.Map<java.lang.String,java.lang.String> fields)
This method is used to publish the fields associated with each new or updated deal, ie it publishes a line in the activity blotter.
user
- A string identifying the logged in user, their logged in namedealId
- A string identifying a new or existing dealfields
- A dictionary of field : value pairsCopyright © 2019 Caplin Systems.