com.pcube.apps.engage.apply
Class RuleSetAdaptor
java.lang.Object
com.pcube.apps.engage.apply.RuleSetAdaptor
public class RuleSetAdaptor
- extends java.lang.Object
constructs a unified set of RulePeers for all packages. use the method
getRules to obtain a map of RulePeer to location in the SML rule pool arrays.
To find a RulePeer instance corresponding to some Rule obtain a
PackageRuleFinder by invoking getPackageRuleFinder
The construction of the rule set assigns SML resources to rules: party
concurrent session counter and BWC instance.
Notice! the rule comparator has an important role in defining and creating
distinct rules. The comparator decides that rules are equal even if sub-set
of the rules' parameters are equal. For example, rules are equal if they both
block traffic regardless of their post/pre settings. Another example is rules
that have no quata limitations; the comparator ignores their post-breach
settings and returns true if their pre-breach settings are equal.
- Author:
- rafis
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RuleSetAdaptor
public RuleSetAdaptor(Policy _policy,
PackageArray packages,
BWCSetAdaptor bwcSetAdaptor)
throws ApplyException
- Parameters:
packages - policy - bwcMap -
- Throws:
ApplyException
getRuleMap
public java.util.Map getRuleMap()
- maps instances of RulePeer to index in global rule set. if the argument
to the get or contains methods of this map is an instance of Rule the map
will return the index of the corresponding RulePeer.
- Returns:
- Returns the ruleMap.
getRuleList
public java.util.List getRuleList()
- Returns:
- a read only list of distinct rules. the location of a rule in the
list equals to its index in the global rule set
getPackageRuleFinder
public RuleSetAdaptor.PackageRuleFinder getPackageRuleFinder(Package pkg)
- returns a finder of rule peer location in the global rule set
corresponding to a specified rule.
Copyright © 2013 Cisco Systems, Inc. Confidential.