org.w3c.www.protocol.http.proxy
Class RuleNode

java.lang.Object
  extended by org.w3c.www.protocol.http.proxy.RuleNode

public class RuleNode
extends java.lang.Object

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
 java.util.Hashtable getChildren()
           
 Rule getRule()
           
 RuleNode lookup(java.lang.String tok)
          Lookup a children rule node.
 Rule lookupRule(java.lang.String host)
          Lookup a rule.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRule

public Rule getRule()

getChildren

public java.util.Hashtable getChildren()

lookupRule

public Rule lookupRule(java.lang.String host)
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.

Returns:
The best matching rule, as a Rule instance, or null if no matching rule was found.

lookup

public RuleNode lookup(java.lang.String tok)
Lookup a children rule node.

Parameters:
tok - The token for the child that is to be looked up.
Returns:
A RuleNode instance, if found, null otherwise.