All Packages  Class Hierarchy  This Package  Previous  Next  Index

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

java.lang.Object
   |
   +----org.w3c.www.protocol.http.proxy.Rule

public class Rule
extends Object
implements Comparable

Variable Index

 o names

Constructor Index

 o Rule()
Empty constructor for dynamic instantiation.

Method Index

 o apply(Request)
Apply given rule to the given request.
 o createRule(String[], int, int)
Create a rule, given an array of String.
 o getHost()
 o getRuleArgs()
 o getRuleName()
 o getRulesName()
 o greaterThan(Comparable)
 o initialize(String[], int, int)
Initialize the rule with given set of tokens.
 o toString()
 o writeRule(DataOutputStream)

Variables

 o names
 protected static String names[]

Constructors

 o Rule
 public Rule()
Empty constructor for dynamic instantiation.

Methods

 o toString
 public String toString()
Overrides:
toString in class Object
 o greaterThan
 public boolean greaterThan(Comparable comp)
 o writeRule
 public void writeRule(DataOutputStream out) throws IOException
 o getHost
 public String getHost()
 o getRuleName
 public String getRuleName()
 o getRuleArgs
 public String getRuleArgs()
 o initialize
 protected void initialize(String tokens[],
                           int offset,
                           int length) throws RuleParserException
Initialize the rule with given set of tokens.

Parameters:
tokens - The token array.
offset - Offset within above array, of tokens to initialize from.
length - Total number of tokens in above array.
Throws: RuleParserException
If the rule couldn't be initialized from given tokens.
 o createRule
 public static Rule createRule(String tokens[],
                               int offset,
                               int length) throws RuleParserException
Create a rule, given an array of String.

Parameters:
tokens - Parsed tokens, as a String array.
offset - Offset of the rule tokens within above array.
length - Total number of available tokens.
Throws: RuleParserException
If no rule could be created out of given tokens.
 o getRulesName
 public static String[] getRulesName()
 o apply
 public Reply apply(Request request)
Apply given rule to the given request.

Parameters:
request - The request to apply the rule to.

All Packages  Class Hierarchy  This Package  Previous  Next  Index