The TOBOUserService
is the interface designed for managing the activities of a client
user who is permissioned to trade on behalf of other (TOBO) users. The interface provides a way to obtain the
list of TOBO users and their respective accounts which the logged-in user can trade upon, as well as querying
and setting the current TOBO user and account selected. An interface is also provided to notify the service
when a trade is started or ended so that the TOBOUserService can manage and alter the logged-in users's ability
to trade, switch accounts, or perform other TOBO-related activities while a trade is ongoing.
Implementations of a TOBOUserService should be registered with the caplin.core.ServiceRegistry#registerService method.
Attributes | Name and Description |
---|---|
|
caplin.trading.service.TOBOUserService()
The |
Attributes | Name and Description |
---|---|
|
void
addListener(caplin.trading.service.TOBOUserServiceListener oListener)
Adds a listener which will be notified when the TOBOUserService state is changed. |
|
void
canPerformTrade()
This method can be used to query whether the logged-in user can perform a trade on behalf of the currently TOBO user. |
|
void
canTradeOnBehalfOf()
This method can be used to query whether the logged-in user can trade on behalf of other users. |
|
String
getAccount()
Returns the account of the currently selected TOBO user which is being used by the logged-in user. |
|
String
getTradeOnBehalfOfUser()
Returns the TOBO user whom the logged-in user is trading on behalf of. |
|
String
getUserType()
Returns the user type of the logged-in user. |
|
void
removeListener(caplin.trading.service.TOBOUserServiceListener oListener)
Removes a listener on the TOBOUserService. |
|
void
setAccount()
Called to set the current TOBO user's account to be used for trading by the logged-in user. |
|
void
setTradeOnBehalfOfUser()
Called to set the TOBO user whom the logged-in user wishes to trade on behalf of. |
|
void
tradeFinished()
This method is called by the trading components to notify the TOBOUserService when a trade has finished. |
|
void
tradeStarted()
This method is called by the trading components to notify the TOBOUserService when a trade has started. |
►
caplin.trading.service.TOBOUserService()
The TOBOUserService
interface — this should never be constructed.
►
void
addListener(caplin.trading.service.TOBOUserServiceListener oListener)
Adds a listener which will be notified when the TOBOUserService state is changed. The listener must be an instance of caplin.trading.service.TOBOUserServiceListener.
caplin.trading.service.TOBOUserServiceListener | oListener | Listener object. |
►
void
canPerformTrade()
This method can be used to query whether the logged-in user can perform a trade on behalf of the currently TOBO user.
►
void
canTradeOnBehalfOf()
This method can be used to query whether the logged-in user can trade on behalf of other users.
►
String
getAccount()
Returns the account of the currently selected TOBO user which is being used by the logged-in user.
►
String
getTradeOnBehalfOfUser()
Returns the TOBO user whom the logged-in user is trading on behalf of.
►
String
getUserType()
Returns the user type of the logged-in user. Used to query whether the user is a trader or a user who is allowed to trade on behalf of other users.
►
void
removeListener(caplin.trading.service.TOBOUserServiceListener oListener)
Removes a listener on the TOBOUserService.
caplin.trading.service.TOBOUserServiceListener | oListener | Listener object. |
►
void
setAccount()
Called to set the current TOBO user's account to be used for trading by the logged-in user.
►
void
setTradeOnBehalfOfUser()
Called to set the TOBO user whom the logged-in user wishes to trade on behalf of.
►
void
tradeFinished()
This method is called by the trading components to notify the TOBOUserService when a trade has finished.
►
void
tradeStarted()
This method is called by the trading components to notify the TOBOUserService when a trade has started.