public abstract class CachingSecurityManager extends Object implements SecurityManager, Destroyable, CacheManagerAware, EventBusAware
SecurityManager method implementations are left to subclasses.
Change in 1.0 - a default CacheManager instance is not created by default during
instantiation. As caching strategies can vary greatly depending on an application's needs, a CacheManager
instance must be explicitly configured if caching across the framework is to be enabled.| Constructor and Description |
|---|
CachingSecurityManager()
Default no-arg constructor that will automatically attempt to initialize a default cacheManager
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterCacheManagerSet()
Template callback to notify subclasses that a
CacheManager has been set and is available for use via the
getCacheManager() method. |
protected void |
afterEventBusSet()
Template callback to notify subclasses that an
EventBus has been set and is available for use
via the getEventBus() method. |
protected void |
applyEventBusToCacheManager() |
void |
destroy()
Destroys the
cacheManager via LifecycleUtils.destroy. |
CacheManager |
getCacheManager()
Returns the CacheManager used by this SecurityManager.
|
EventBus |
getEventBus()
Returns the
EventBus used by this SecurityManager and potentially any of its children components. |
void |
setCacheManager(CacheManager cacheManager)
Sets the CacheManager used by this
SecurityManager and potentially any of its
children components. |
void |
setEventBus(EventBus eventBus)
Sets the EventBus used by this
SecurityManager and potentially any of its
children components. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateSubject, login, logoutauthenticatecheckPermission, checkPermission, checkPermissions, checkPermissions, checkRole, checkRoles, checkRoles, hasAllRoles, hasRole, hasRoles, isPermitted, isPermitted, isPermitted, isPermitted, isPermittedAll, isPermittedAllgetSession, startpublic CachingSecurityManager()
public CacheManager getCacheManager()
public void setCacheManager(CacheManager cacheManager)
SecurityManager and potentially any of its
children components.
After the cacheManager attribute has been set, the template method
afterCacheManagerSet() is executed to allow subclasses to adjust when a
cacheManager is available.setCacheManager in interface CacheManagerAwarecacheManager - the CacheManager used by this SecurityManager and potentially any of its
children components.protected void afterCacheManagerSet()
CacheManager has been set and is available for use via the
getCacheManager() method.public EventBus getEventBus()
EventBus used by this SecurityManager and potentially any of its children components.EventBus used by this SecurityManager and potentially any of its children components.public void setEventBus(EventBus eventBus)
SecurityManager and potentially any of its
children components.
After the eventBus attribute has been set, the template method
afterEventBusSet() is executed to allow subclasses to adjust when a
eventBus is available.setEventBus in interface EventBusAwareeventBus - the EventBus used by this SecurityManager and potentially any of its
children components.protected void applyEventBusToCacheManager()
protected void afterEventBusSet()
EventBus has been set and is available for use
via the getEventBus() method.public void destroy()
cacheManager via LifecycleUtils.destroy.destroy in interface DestroyableCopyright © 2004-2016 The Apache Software Foundation. All Rights Reserved.