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

Quick Search    Search Deep

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

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

public class UserRoleRule
extends BaseRule

This rule redirects the request based on the user's role.


Field Summary
private  java.lang.String role
          The desired role for the user.
 
Fields inherited from class org.apache.webapp.balancer.rules.BaseRule
 
Constructor Summary
UserRoleRule()
           
 
Method Summary
protected  java.lang.String getRole()
          Returns the target role.
 boolean matches(javax.servlet.http.HttpServletRequest request)
          Determine if the given request matches the rule.
 void setRole(java.lang.String theRole)
          Sets the desired role.
 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

role

private java.lang.String role
The desired role for the user. If the user is in this role, the match will succeed.

Constructor Detail

UserRoleRule

public UserRoleRule()
Method Detail

setRole

public void setRole(java.lang.String theRole)
Sets the desired role.


getRole

protected java.lang.String getRole()
Returns the target role.


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