RealmSecurityManager

Shiro support of a {@link SecurityManager} class hierarchy based around a collection of {@link hunt.shiro.realm.Realm}s. All actual {@code SecurityManager} method implementations are left to subclasses.

Constructors

this
this()

Default no-arg constructor.

Members

Functions

afterCacheManagerSet
void afterCacheManagerSet()

Simply calls {@link #applyCacheManagerToRealms() applyCacheManagerToRealms()} to allow the newly set {@link hunt.shiro.cache.CacheManager CacheManager} to be propagated to the internal collection of <code>Realm</code> that would need to use it.

afterEventBusSet
void afterEventBusSet()
Undocumented in source. Be warned that the author may not have intended to support it.
afterRealmsSet
void afterRealmsSet()
Undocumented in source. Be warned that the author may not have intended to support it.
applyCacheManagerToRealms
void applyCacheManagerToRealms()

Sets the internal {@link #getCacheManager CacheManager} on any internal configured {@link #getRealms Realms} that implement the {@link hunt.shiro.cache.CacheManagerAware CacheManagerAware} interface. <p/> This method is called after setting a cacheManager on this securityManager via the {@link #setCacheManager(hunt.shiro.cache.CacheManager) setCacheManager} method to allow it to be propagated down to all the internal Realms that would need to use it. <p/> It is also called after setting one or more realms via the {@link #setRealm setRealm} or {@link #setRealms setRealms} methods to allow these newly available realms to be given the cache manager already in use.

applyEventBusToRealms
void applyEventBusToRealms()

Sets the internal {@link #getEventBus EventBus} on any internal configured {@link #getRealms Realms} that implement the {@link EventBusAware} interface. <p/> This method is called after setting an eventBus on this securityManager via the {@link #setEventBus(hunt.shiro.event.EventBus) setEventBus} method to allow it to be propagated down to all the internal Realms that would need to use it. <p/> It is also called after setting one or more realms via the {@link #setRealm setRealm} or {@link #setRealms setRealms} methods to allow these newly available realms to be given the EventBus already in use.

destroy
void destroy()
Undocumented in source. Be warned that the author may not have intended to support it.
getRealms
Realm[] getRealms()

Returns the {@link Realm Realm}s managed by this SecurityManager instance.

setRealm
void setRealm(Realm realm)

Convenience method for applications using a single realm that merely wraps the realm in a list and then invokes the {@link #setRealms} method.

setRealms
void setRealms(Realm[] realms)

Sets the realms managed by this <tt>SecurityManager</tt> instance.

Inherited Members

From CachingSecurityManager

getCacheManager
CacheManager getCacheManager()

Returns the CacheManager used by this SecurityManager.

setCacheManager
void setCacheManager(CacheManager cacheManager)

Sets the CacheManager used by this {@code SecurityManager} and potentially any of its children components. <p/> After the cacheManager attribute has been set, the template method {@link #afterCacheManagerSet afterCacheManagerSet()} is executed to allow subclasses to adjust when a cacheManager is available.

afterCacheManagerSet
void afterCacheManagerSet()

Template callback to notify subclasses that a {@link hunt.shiro.cache.CacheManager CacheManager} has been set and is available for use via the {@link #getCacheManager getCacheManager()} method.

getEventBus
EventBus getEventBus()

Returns the {@code EventBus} used by this SecurityManager and potentially any of its children components.

setEventBus
void setEventBus(EventBus eventBus)

Sets the EventBus used by this {@code SecurityManager} and potentially any of its children components. <p/> After the eventBus attribute has been set, the template method {@link #afterEventBusSet() afterEventBusSet()} is executed to allow subclasses to adjust when a eventBus is available.

applyEventBusToCacheManager
void applyEventBusToCacheManager()
afterEventBusSet
void afterEventBusSet()

Template callback to notify subclasses that an {@link EventBus EventBus} has been set and is available for use via the {@link #getEventBus() getEventBus()} method.

destroy
void destroy()

Destroys the {@link #getCacheManager() cacheManager} via {@link LifecycleUtils#destroy LifecycleUtils.destroy}.

Meta