Apama Capital Markets Foundation Documentation : Capital Markets Foundation : Order Management : Risk firewall : Understanding risk firewalls : Risk firewall components
Risk firewall components
The main components in any risk firewall architecture are:
*Risk firewall factory. You use com.apama.firewall.RiskFirewallFactory to create firewall instances in the current context and to connect to remote firewall instances, which are in other contexts or monitors.
*Risk firewall. You obtain an instance of a risk firewall (com.apama.firewall.RiskFirewall) by either creating a risk firewall with a RiskFirewallFactory instance or by connecting to a risk firewall with a RiskFirewallFactory instance. You use a risk firewall instance to register the rule classes and add the rule instances that specify the criteria against which to evaluate orders. Also, a RiskFirewall instance provides actions for setting callbacks to be executed upon changing the lock state of the risk firewall and upon rule query responses that indicate whether an order was approved. When you connect to a remote risk firewall, there are some RiskFirewall actions that are not available because the risk firewall you are connected to is in another context or monitor. See Connecting to risk firewalls.
*Order sender. A RiskFirewall instance provides an action for obtaining an instance of an order sender (com.apama.firewall.OrderSender). You use an order sender to send orders into the risk firewall for evaluation. When there is an update to a submitted order the risk firewall sends it to the order sender that originated the order.
*Order receiver. A RiskFirewall instance provides an action for obtaining an instance of an order receiver (com.apama.firewall.OrderReceiver). You use an order receiver to receive approved orders from the risk firewall, and process them according to your application logic. For example, an order receiver can send approved orders to external order management systems. A risk firewall order receiver also receives order updates back from those systems, and sends order updates back through the risk firewall.
*Rule class factory. You use com.apama.firewall.RuleClassFactory to create a default implementation of a custom rule class. You can then customize the default implementation to evaluate orders against particular, specified parameters.
*Rule class. The rule class factory returns a com.apama.firewall.RuleClass instance. Each rule class instance is a specific implementation of a rule class that evaluates the orders sent into the risk firewall.
The default rule classes provided with CMF are defined in the com.apama.firewall.rules package. For each default rule class, there is an event interface, also in the com.apama.firewall.rules package, that defines the configuration parameters you can specify for that rule class.
A risk firewall application also uses:
*com.apama.oms.NewOrder, AmendOrder, and CancelOrder — to send new orders to an external order management system, or to amend or cancel orders submitted to an OMS.
*com.apama.oms.OrderUpdate — for updates to submitted orders.
*com.apama.utils.Params — to set parameters for risk firewall factories, risk firewall instances, and rule class instances.
*com.apama.utils.ParamsSchema — to define the configuration options that are available to be set for a rule class and to define the possible values for each configuration option.
*com.apama.utils.Error — to override default error handling behavior for risk firewall factories and risk firewall instances.
See the ApamaDoc for details about these interfaces.
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback