com.caucho.server.security
Class CachingPrincipal

java.lang.Object
  extended by com.caucho.security.BasicPrincipal
      extended by com.caucho.server.security.CachingPrincipal
All Implemented Interfaces:
java.io.Serializable, java.security.Principal

public class CachingPrincipal
extends BasicPrincipal

Principal which caches the roles.

See Also:
Serialized Form

Constructor Summary
CachingPrincipal()
          Zero-arg constructor for serialization.
CachingPrincipal(java.lang.String name)
          Creates a new caching principal.
 
Method Summary
 void addRole(java.lang.String role)
          Sets the boolean for the role.
 java.lang.Boolean isInRole(java.lang.String role)
          Returns the boolean for the role.
 
Methods inherited from class com.caucho.security.BasicPrincipal
equals, getName, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CachingPrincipal

public CachingPrincipal()
Zero-arg constructor for serialization.


CachingPrincipal

public CachingPrincipal(java.lang.String name)
Creates a new caching principal.

Method Detail

isInRole

public java.lang.Boolean isInRole(java.lang.String role)
Returns the boolean for the role.

Returns:
null if the role status is unknown

addRole

public void addRole(java.lang.String role)
Sets the boolean for the role.