| java.lang.Object org.w3c.www.protocol.http.proxy.RuleNode
RuleNode | public class RuleNode (Code) | | A RuleNode instance keeps track of one token within the lfh of a rule.
This data structure is usually known as a hash-trie, check
one of the Knuth books for more infos.
|
Method Summary | |
synchronized RuleNode | addChild(String tok, Rule rule) Add a children rule node to this rule node.
Parameters: token - The child token. Parameters: rule - The rule to map to this token. | synchronized RuleNode | addChild(String tok) Add a children rule node to this node.
This method does the same as above, except that it doesn't map
the created node to a rule.
Parameters: tok - The token this node applies to. | public Hashtable | getChildren() | public Rule | getRule() | public RuleNode | lookup(String tok) Lookup a children rule node.
Parameters: tok - The token for the child that is to be looked up. | public Rule | lookupRule(String host) Lookup a rule. | void | setRule(Rule rule) |
children | Hashtable children(Code) | | A hashtable to keep track of children rules.
|
rule | Rule rule(Code) | | It's optionally associated rule.
|
addChild | synchronized RuleNode addChild(String tok, Rule rule)(Code) | | Add a children rule node to this rule node.
Parameters: token - The child token. Parameters: rule - The rule to map to this token. The newly created RuleNode instance. |
addChild | synchronized RuleNode addChild(String tok)(Code) | | Add a children rule node to this node.
This method does the same as above, except that it doesn't map
the created node to a rule.
Parameters: tok - The token this node applies to. The newly createed RuleNode instance. |
lookup | public RuleNode lookup(String tok)(Code) | | Lookup a children rule node.
Parameters: tok - The token for the child that is to be looked up. A RuleNode instance, if found, nullotherwise. |
lookupRule | public Rule lookupRule(String host)(Code) | | Lookup a rule.
Given a fully qualified host name, parse it into its components, and
starting from this rule node, lookup for a matching rule.
The most precise rule is always returned.
The best matching rule, as a Rule instance, or null if no matching rule was found. |
|
|