Class ObserversHandler


  • public class ObserversHandler
    extends java.lang.Object
    Thread safe class maintaining a collection of StoreUpdateListeners. Type-safe counterpart of Observable.
    Author:
    K. Benedyczak
    • 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()