Apama Capital Markets Foundation Documentation : Capital Markets Foundation : Order Management : Risk firewall : Creating risk firewalls
Creating risk firewalls
 
Sample code for creating risk firewall
Sample code for creating risk firewall and specifying a callback
Deleting risk firewalls
To create a risk firewall, execute either of the following actions:
*com.apama.firewall.RiskFirewallFactory.create() constructs a new risk firewall instance in the current context.
*com.apama.firewall.RiskFirewallFactory.createCb() constructs a new risk firewall instance in the current context and then executes the specified callback.
Both actions take these two parameters:
*serviceManagerCtx is a reference to the context that the Service Framework manager has been created in. Currently, this is always the main context.
*rfwName is a string that contains the name for the risk firewall. In an application, two risk firewalls cannot have the same name.
In addition, the createCb() action takes a callback action as its third parameter.
Creation of a risk firewall is asynchronous. If your application requires notification when the risk firewall has been constructed, execute the createCb() action. After the CMF is activated and the risk firewall is constructed, the specified callback will be executed.
You may perform actions immediately after the call to create the risk firewall, for example you can register rule classes, add rule class instances, or connect to a the new risk firewall. In this case, the create callback will be executed after the rule classes are registered, the rule class instances are added, and the connections from remote contexts or monitors are set up. After execution of this callback, you can of course register additional rule classes, add more rule class instances, and connect from additional contexts and monitors.
If any parameters are set on a RiskFirewallFactory, these parameters have the same settings in a risk firewall instance created by that factory. If default error handling is changed for a RiskFirewallFactory instance and then you use it to create a risk firewall, if there is an error in the creation of the risk firewall then the updated error handling behavior is followed. Also, a risk firewall instance created by this factory handles errors in the same way as the factory. See Configuring risk firewall factories.
Any parameters you set for a risk firewall factory instance and any error handling behavior you update for that factory apply to only subsequently created risk firewalls.
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback