JSecurity

org.jsecurity.realm
Class CachingRealm

java.lang.Object
  extended by org.jsecurity.realm.CachingRealm
All Implemented Interfaces:
Authorizer, CacheManagerAware, Realm
Direct Known Subclasses:
AuthenticatingRealm

public abstract class CachingRealm
extends Object
implements Realm, CacheManagerAware

A very basic abstract extension point for the Realm interface that provides logging and caching support.

All actual Realm method implementations are left to subclasses.

Since:
0.9
Author:
Les Hazlewood

Constructor Summary
CachingRealm()
           
CachingRealm(CacheManager cacheManager)
           
 
Method Summary
protected  void afterCacheManagerSet()
           
 CacheManager getCacheManager()
          Returns the CacheManager used for data caching to reduce EIS round trips, or null if caching is disabled.
 String getName()
          Returns the (application-unique) name assigned to this Realm.
 void setCacheManager(CacheManager authzInfoCacheManager)
          Sets the CacheManager to be used for data caching to reduce EIS round trips.
 void setName(String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jsecurity.realm.Realm
getAuthenticationInfo, supports
 
Methods inherited from interface org.jsecurity.authz.Authorizer
checkPermission, checkPermission, checkPermissions, checkPermissions, checkRole, checkRoles, hasAllRoles, hasRole, hasRoles, isPermitted, isPermitted, isPermitted, isPermitted, isPermittedAll, isPermittedAll
 

Constructor Detail

CachingRealm

public CachingRealm()

CachingRealm

public CachingRealm(CacheManager cacheManager)
Method Detail

getCacheManager

public CacheManager getCacheManager()
Returns the CacheManager used for data caching to reduce EIS round trips, or null if caching is disabled.

Returns:
the CacheManager used for data caching to reduce EIS round trips, or null if caching is disabled.

setCacheManager

public void setCacheManager(CacheManager authzInfoCacheManager)
Sets the CacheManager to be used for data caching to reduce EIS round trips.

This property is null by default, indicating that caching is turned off.

Specified by:
setCacheManager in interface CacheManagerAware
Parameters:
authzInfoCacheManager - the CacheManager to use for data caching, or null to disable caching.

afterCacheManagerSet

protected void afterCacheManagerSet()

getName

public String getName()
Description copied from interface: Realm
Returns the (application-unique) name assigned to this Realm. All realms configured for a single application must have a unique name.

Specified by:
getName in interface Realm
Returns:
the (application-unique) name assigned to this Realm.

setName

public void setName(String name)

JSecurity

Copyright © 2004-2008 JSecurity.