org.jscep.client.inspect.DefaultCertStoreInspectorFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jscep Show documentation
Show all versions of jscep Show documentation
Java implementation of the Simple Certificate Enrollment Protocol
package org.jscep.client.inspect;
import java.security.cert.CertStore;
import java.util.Collections;
import java.util.Map;
import java.util.WeakHashMap;
/**
* Concrete factory for generating new DefaultCertStoreInspector instances.
*/
public class DefaultCertStoreInspectorFactory implements
CertStoreInspectorFactory {
private static final Map INSTANCES = Collections.synchronizedMap(new WeakHashMap());
/**
* {@inheritDoc}
*/
@Override
public CertStoreInspector getInstance(final CertStore store) {
CertStoreInspector instance = INSTANCES.get(store);
if (instance != null) {
return instance;
}
instance = new DefaultCertStoreInspector(store);
INSTANCES.put(store, instance);
return instance;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy