public JBossAuthenticationCache(int initCapacity, float loadFactor,int level) { this.concurrencyLevel = level; this.loadFactor = loadFactor; this.initialCapacity = initCapacity; constructCache(); }
/** * @see SecurityCache#get(Object) */ @SuppressWarnings("unchecked") public <Y> Y get(Principal key) throws SecurityCacheException { Subject subj = null; if(cacheHit(key)) { AuthCacheObject aco = cacheMap.get(key); subj = aco.subject; } return (Y) subj; }
/** * @see SecurityCache#addCacheEntry(Object, Map) */ public void addCacheEntry(Principal principal, Map<String, Object> map) throws SecurityCacheException { try { AuthCacheObject ao = new AuthCacheObject(map.get(SecurityConstants.CREDENTIAL), (Subject) map.get(SecurityConstants.SUBJECT)); cacheMap.put(principal, ao); } catch(Exception e) { throw new SecurityCacheException(e); } }
if(!cacheHit(principal)) throw new SecurityCacheException("Cache Miss"); Object cred = map.get(SecurityConstants.CREDENTIAL); AuthCacheObject ao = cacheMap.get(principal); throw new SecurityCacheException("Cache Validation Failed");
/** * @see SecurityCache#addCacheEntry(Object, Map) */ public void addCacheEntry(Principal principal, Map<String, Object> map) throws SecurityCacheException { try { AuthCacheObject ao = new AuthCacheObject(map.get(SecurityConstants.CREDENTIAL), (Subject) map.get(SecurityConstants.SUBJECT)); cacheMap.put(principal, ao); } catch(Exception e) { throw new SecurityCacheException(e); } }
if(!cacheHit(principal)) throw new SecurityCacheException(PicketBoxMessages.MESSAGES.cacheMissMessage()); Object cred = map.get(SecurityConstants.CREDENTIAL); AuthCacheObject ao = cacheMap.get(principal); throw new SecurityCacheException(PicketBoxMessages.MESSAGES.cacheValidationFailedMessage());
public JBossAuthenticationCache() { constructCache(); }
/** * @see SecurityCache#get(Object) */ @SuppressWarnings("unchecked") public <Y> Y get(Principal key) throws SecurityCacheException { Subject subj = null; if(cacheHit(key)) { AuthCacheObject aco = cacheMap.get(key); subj = aco.subject; } return (Y) subj; }
public JBossAuthenticationCache(int initCapacity, float loadFactor,int level) { this.concurrencyLevel = level; this.loadFactor = loadFactor; this.initialCapacity = initCapacity; constructCache(); }
public JBossAuthenticationCache() { constructCache(); }