/** * Is association valid. * * @param association the association * @return true/false */ protected boolean isAssociationValid(final Association association) { return association != null && !association.hasExpired(); } }
/** * Is association valid. * * @param association the association * @return the boolean */ protected boolean isAssociationValid(final Association association) { return association != null && !association.hasExpired(); } }
private synchronized void removeExpired() { Set handleToRemove = new HashSet(); Iterator handles = _handleMap.keySet().iterator(); while (handles.hasNext()) { String handle = (String) handles.next(); Association association = (Association) _handleMap.get(handle); if (association.hasExpired()) handleToRemove.add(handle); } handles = handleToRemove.iterator(); while (handles.hasNext()) { String handle = (String) handles.next(); if (DEBUG) _log.debug("Removing expired association, handle: " + handle); _handleMap.remove(handle); } }
private synchronized void removeExpired() { Set handleToRemove = new HashSet(); Iterator handles = _handleMap.keySet().iterator(); while (handles.hasNext()) { String handle = (String) handles.next(); Association association = (Association) _handleMap.get(handle); if (association.hasExpired()) handleToRemove.add(handle); } handles = handleToRemove.iterator(); while (handles.hasNext()) { String handle = (String) handles.next(); if (DEBUG) _log.debug("Removing expired association, handle: " + handle); _handleMap.remove(handle); } }
private synchronized void removeExpired() { Set handleToRemove = new HashSet(); Iterator handles = _handleMap.keySet().iterator(); while (handles.hasNext()) { String handle = (String) handles.next(); Association association = (Association) _handleMap.get(handle); if (association.hasExpired()) handleToRemove.add(handle); } handles = handleToRemove.iterator(); while (handles.hasNext()) { String handle = (String) handles.next(); if (DEBUG) _log.debug("Removing expired association, handle: " + handle); _handleMap.remove(handle); } }
private synchronized void removeExpired() { Set handleToRemove = new HashSet(); Iterator handles = _handleMap.keySet().iterator(); while (handles.hasNext()) { String handle = (String) handles.next(); Association association = (Association) _handleMap.get(handle); if (association.hasExpired()) { handleToRemove.add(handle); } } handles = handleToRemove.iterator(); while (handles.hasNext()) { String handle = (String) handles.next(); if (DEBUG) { _log.debug("Removing expired association, handle: " + handle); } _handleMap.remove(handle); } }
private synchronized void removeExpired() { Set handleToRemove = new HashSet(); Iterator handles = _handleMap.keySet().iterator(); while (handles.hasNext()) { String handle = (String) handles.next(); Association association = (Association) _handleMap.get(handle); if (association.hasExpired()) handleToRemove.add(handle); } handles = handleToRemove.iterator(); while (handles.hasNext()) { String handle = (String) handles.next(); if (DEBUG) _log.debug("Removing expired association, handle: " + handle); _handleMap.remove(handle); } }
if (association.hasExpired()) { handleToRemove.add(handle);
if (association.hasExpired())
if (association.hasExpired())
if (association.hasExpired())
if (association.hasExpired())
public Association load(String handle) { // get association using map Association association = OpenIDAssociationReplicationManager.getPersistenceManager().getAssociation(handle); // no association found for the given handle if (association == null) { log.warn("Association " + handle + " not found in the map."); return null; } // if the association is expired if (association.hasExpired()) { log.warn("Association is expired for handle " + handle); remove(handle); // remove from map return null; } return association; }
public Association load(String handle) { // get association using map Association association = OpenIDAssociationReplicationManager.getPersistenceManager().getAssociation(handle); // no association found for the given handle if (association == null) { log.warn("Association " + handle + " not found in the map."); return null; } // if the association is expired if (association.hasExpired()) { log.warn("Association is expired for handle " + handle); remove(handle); // remove from map return null; } return association; }
if (association.hasExpired()) { log.warn("Association is expired for handle " + handle);
if (association.hasExpired()) { log.warn("Association is expired for handle " + handle);