Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.webapp.balancer.rules
Class RequestParameterRule  view RequestParameterRule download RequestParameterRule.java

java.lang.Object
  extended byorg.apache.webapp.balancer.rules.BaseRule
      extended byorg.apache.webapp.balancer.rules.RequestParameterRule
All Implemented Interfaces:
org.apache.webapp.balancer.Rule

public class RequestParameterRule
extends BaseRule

This rule accepts or rejects requests based on the presence of a parameter in the request.


Field Summary
private  java.lang.String paramName
          The target parameter name (parameter must be present for match to succeed).
private  java.lang.String paramValue
          The target parameter value.
 
Fields inherited from class org.apache.webapp.balancer.rules.BaseRule
 
Constructor Summary
RequestParameterRule()
           
 
Method Summary
protected  java.lang.String getParamName()
          Returns the target parameter name.
protected  java.lang.String getParamValue()
          Returns the target parameter value, which may be null.
 boolean matches(javax.servlet.http.HttpServletRequest request)
          Determine if the given request matches the rule.
 void setParamName(java.lang.String theParamName)
          Sets the target parameter name.
 void setParamValue(java.lang.String theParamValue)
          Sets the parameter value, which may be null.
 java.lang.String toString()
          Returns a String representation of this object.
 
Methods inherited from class org.apache.webapp.balancer.rules.BaseRule
getName, getRedirectUrl, setName, setRedirectUrl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

paramName

private java.lang.String paramName
The target parameter name (parameter must be present for match to succeed).


paramValue

private java.lang.String paramValue
The target parameter value. This is optional: null means any parameter value is OK for a match. A non-null value will be matches exactly.

Constructor Detail

RequestParameterRule

public RequestParameterRule()
Method Detail

setParamName

public void setParamName(java.lang.String theParamName)
Sets the target parameter name.


getParamName

protected java.lang.String getParamName()
Returns the target parameter name.


setParamValue

public void setParamValue(java.lang.String theParamValue)
Sets the parameter value, which may be null.


getParamValue

protected java.lang.String getParamValue()
Returns the target parameter value, which may be null.


matches

public boolean matches(javax.servlet.http.HttpServletRequest request)
Description copied from interface: org.apache.webapp.balancer.Rule
Determine if the given request matches the rule.

Specified by:
matches in interface org.apache.webapp.balancer.Rule
Specified by:
matches in class BaseRule

toString

public java.lang.String toString()
Returns a String representation of this object.

Overrides:
toString in class BaseRule