Registering rule classes with a risk firewall
A risk firewall instance provides two actions for registering a rule class:
RiskFirewall.registerRuleClass() takes one argument, which is the
com.apama.firewall.RuleClass implementation to register. This action registers that rule class with the risk firewall instance it is called on.
RiskFirewall.registerRuleClassCb() takes two arguments. The first argument is the
com.apama.firewall.RuleClass implementation to register. The second argument is a callback that gets executed if registration is successful.
Both actions are asynchronous, their availability is pending until the risk firewall is created, and they are not available from a risk firewall that is connected to a remote risk firewall instance. It is an error if the time period specified by the CONFIG_TIMEOUT_DURATION parameter elapses before the risk firewall is created. This prevents the risk firewall from being blocked while waiting to register a rule class implementation that has possibly entered an error state.
A number of rule classes are provided with the risk firewall. See
Descriptions of default rule classes. If these rule classes do not meet your application requirements, see
Implementing custom risk firewall rule classes.