eu.emi.security.authn.x509.helpers.ns
Class LazyEuGridPmaNamespacesStore

java.lang.Object
  extended by eu.emi.security.authn.x509.helpers.ns.AbstractNamespacesStore
      extended by eu.emi.security.authn.x509.helpers.ns.AbstractEuGridPmaNamespacesStore
          extended by eu.emi.security.authn.x509.helpers.ns.LazyEuGridPmaNamespacesStore
All Implemented Interfaces:
NamespacesStore

public class LazyEuGridPmaNamespacesStore
extends AbstractEuGridPmaNamespacesStore

EuGridPMA namespace policies are loaded on demand by this store and are cached in memory. A weak hash map is used to cache data. Additionally the data is cached for no longer then the update interval, which in practice is the same as for the cooperating truststore. This class it thread safe.

Author:
K. Benedyczak

Field Summary
protected  String directory
           
protected  long updateInterval
           
 
Fields inherited from class eu.emi.security.authn.x509.helpers.ns.AbstractEuGridPmaNamespacesStore
SUFFIX
 
Fields inherited from class eu.emi.security.authn.x509.helpers.ns.AbstractNamespacesStore
observers, openssl1Mode
 
Constructor Summary
LazyEuGridPmaNamespacesStore(ObserversHandler observers, boolean openssl1Mode, String directory, long updateInterval)
           
 
Method Summary
protected  List<NamespacePolicy> getPoliciesByIssuerDn(String definedForHash, String issuerDn)
           
protected  List<NamespacePolicy> getPoliciesByIssuerHash(String definedForHash, String issuerHash)
           
 void setPolicies(Collection<String> locations)
           
 
Methods inherited from class eu.emi.security.authn.x509.helpers.ns.AbstractEuGridPmaNamespacesStore
getFileSuffix, getNotificationType, getParser, getPolicies
 
Methods inherited from class eu.emi.security.authn.x509.helpers.ns.AbstractNamespacesStore
addPolicy, addPolicyToMap, getCachedPolicies, getPolicies, tryLoadNsLocation, tryLoadNsPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

directory

protected final String directory

updateInterval

protected final long updateInterval
Constructor Detail

LazyEuGridPmaNamespacesStore

public LazyEuGridPmaNamespacesStore(ObserversHandler observers,
                                    boolean openssl1Mode,
                                    String directory,
                                    long updateInterval)
Method Detail

setPolicies

public void setPolicies(Collection<String> locations)

getPoliciesByIssuerHash

protected List<NamespacePolicy> getPoliciesByIssuerHash(String definedForHash,
                                                        String issuerHash)
Specified by:
getPoliciesByIssuerHash in class AbstractEuGridPmaNamespacesStore

getPoliciesByIssuerDn

protected List<NamespacePolicy> getPoliciesByIssuerDn(String definedForHash,
                                                      String issuerDn)
Specified by:
getPoliciesByIssuerDn in class AbstractEuGridPmaNamespacesStore


Copyright © 2012-2014 European Middleware Initiative. All Rights Reserved.