/** * 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. * * @param cacheManager the CacheManager used by this {@code SecurityManager} and potentially any of its * children components. */ public void setCacheManager(CacheManager cacheManager) { this.cacheManager = cacheManager; afterCacheManagerSet(); }
public void destroy() { LifecycleUtils.destroy(getRealms()); this.realms = null; super.destroy(); }
/** * Destroys the {@link #getCacheManager() cacheManager} via {@link LifecycleUtils#destroy LifecycleUtils.destroy}. */ public void destroy() { LifecycleUtils.destroy(getCacheManager()); this.cacheManager = null; LifecycleUtils.destroy(getEventBus()); this.eventBus = new DefaultEventBus(); }
/** * Destroys the {@link #getCacheManager() cacheManager} via {@link LifecycleUtils#destroy LifecycleUtils.destroy}. */ public void destroy() { LifecycleUtils.destroy(getCacheManager()); this.cacheManager = null; }
/** * 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. * * @param eventBus the EventBus used by this {@code SecurityManager} and potentially any of its * children components. * @since 1.3 */ public void setEventBus(EventBus eventBus) { this.eventBus = eventBus; afterEventBusSet(); }
/** * Template callback to notify subclasses that a * {@link org.apache.shiro.cache.CacheManager CacheManager} has been set and is available for use via the * {@link #getCacheManager getCacheManager()} method. */ protected void afterCacheManagerSet() { applyEventBusToCacheManager(); }
/** * Default no-arg constructor that will automatically attempt to initialize a default cacheManager */ public CachingSecurityManager() { //use a default event bus: setEventBus(new DefaultEventBus()); }
@Override protected void afterEventBusSet() { super.afterEventBusSet(); applyEventBusToRealms(); }
/** * Template callback to notify subclasses that an {@link EventBus EventBus} has been set and is available for use * via the {@link #getEventBus() getEventBus()} method. * * @since 1.3 */ protected void afterEventBusSet() { applyEventBusToCacheManager(); }
/** * Default no-arg constructor that will automatically attempt to initialize a default cacheManager */ public CachingSecurityManager() { //use a default event bus: setEventBus(new DefaultEventBus()); }
/** * Simply calls {@link #applyCacheManagerToRealms() applyCacheManagerToRealms()} to allow the * newly set {@link org.apache.shiro.cache.CacheManager CacheManager} to be propagated to the internal collection of <code>Realm</code> * that would need to use it. */ protected void afterCacheManagerSet() { super.afterCacheManagerSet(); applyCacheManagerToRealms(); }
/** * Destroys the {@link #getCacheManager() cacheManager} via {@link LifecycleUtils#destroy LifecycleUtils.destroy}. */ public void destroy() { LifecycleUtils.destroy(getCacheManager()); this.cacheManager = null; LifecycleUtils.destroy(getEventBus()); this.eventBus = new DefaultEventBus(); }
public void destroy() { LifecycleUtils.destroy(getRealms()); this.realms = null; super.destroy(); }
/** * 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. * * @param eventBus the EventBus used by this {@code SecurityManager} and potentially any of its * children components. * @since 1.3 */ public void setEventBus(EventBus eventBus) { this.eventBus = eventBus; afterEventBusSet(); }
/** * Template callback to notify subclasses that a * {@link org.apache.shiro.cache.CacheManager CacheManager} has been set and is available for use via the * {@link #getCacheManager getCacheManager()} method. */ protected void afterCacheManagerSet() { applyEventBusToCacheManager(); }
/** * 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. * * @param cacheManager the CacheManager used by this {@code SecurityManager} and potentially any of its * children components. */ public void setCacheManager(CacheManager cacheManager) { this.cacheManager = cacheManager; afterCacheManagerSet(); }
public void destroy() { LifecycleUtils.destroy(getRealms()); this.realms = null; super.destroy(); }
@Override protected void afterEventBusSet() { super.afterEventBusSet(); applyEventBusToRealms(); }
/** * Template callback to notify subclasses that an {@link EventBus EventBus} has been set and is available for use * via the {@link #getEventBus() getEventBus()} method. * * @since 1.3 */ protected void afterEventBusSet() { applyEventBusToCacheManager(); }
/** * Simply calls {@link #applyCacheManagerToRealms() applyCacheManagerToRealms()} to allow the * newly set {@link org.apache.shiro.cache.CacheManager CacheManager} to be propagated to the internal collection of <code>Realm</code> * that would need to use it. */ protected void afterCacheManagerSet() { super.afterCacheManagerSet(); applyCacheManagerToRealms(); }