Default no-arg constructor.
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.
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.
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.
Returns the {@link Realm Realm}s managed by this SecurityManager instance.
Convenience method for applications using a single realm that merely wraps the realm in a list and then invokes the {@link #setRealms} method.
Sets the realms managed by this <tt>SecurityManager</tt> instance.
Returns the CacheManager used by this SecurityManager.
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.
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.
Returns the {@code EventBus} used by this SecurityManager and potentially any of its children components.
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.
Template callback to notify subclasses that an {@link EventBus EventBus} has been set and is available for use via the {@link #getEventBus() getEventBus()} method.
Destroys the {@link #getCacheManager() cacheManager} via {@link LifecycleUtils#destroy LifecycleUtils.destroy}.
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.