Class ObserversHandler
- java.lang.Object
-
- eu.emi.security.authn.x509.helpers.ObserversHandler
-
public class ObserversHandler extends java.lang.Object
Thread safe class maintaining a collection ofStoreUpdateListener
s. Type-safe counterpart ofObservable
.- Author:
- K. Benedyczak
-
-
Constructor Summary
Constructors Constructor Description ObserversHandler()
ObserversHandler(java.util.Collection<? extends StoreUpdateListener> initialObservers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addObserver(StoreUpdateListener listener)
Registers a listener which can react to errors found during refreshing of the trust material: trusted CAs or CRLs.void
notifyObservers(java.lang.String url, java.lang.String type, StoreUpdateListener.Severity level, java.lang.Exception e)
void
removeAllObservers()
void
removeObserver(StoreUpdateListener listener)
Unregisters a previously registered CA or CRL update listener.
-
-
-
Constructor Detail
-
ObserversHandler
public ObserversHandler()
-
ObserversHandler
public ObserversHandler(java.util.Collection<? extends StoreUpdateListener> initialObservers)
-
-
Method Detail
-
addObserver
public void addObserver(StoreUpdateListener listener)
Registers a listener which can react to errors found during refreshing of the trust material: trusted CAs or CRLs. This method is useful only if the implementation supports updating of CAs or CRLs, otherwise the listener will not be invoked.- Parameters:
listener
- to be registered
-
removeObserver
public void removeObserver(StoreUpdateListener listener)
Unregisters a previously registered CA or CRL update listener. If the listener was not registered then the method does nothing.- Parameters:
listener
- to be unregistered
-
notifyObservers
public void notifyObservers(java.lang.String url, java.lang.String type, StoreUpdateListener.Severity level, java.lang.Exception e)
-
removeAllObservers
public void removeAllObservers()
-
-