eu.emi.security.authn.x509.helpers
Class ObserversHandler

java.lang.Object
  extended by eu.emi.security.authn.x509.helpers.ObserversHandler

public class ObserversHandler
extends Object

Thread safe class maintaining a collection of StoreUpdateListeners. Type-safe counterpart of Observable.

Author:
K. Benedyczak

Constructor Summary
ObserversHandler()
           
ObserversHandler(Collection<? extends StoreUpdateListener> initialObservers)
           
 
Method Summary
 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(String url, String type, StoreUpdateListener.Severity level, Exception e)
           
 void removeAllObservers()
           
 void removeObserver(StoreUpdateListener listener)
          Unregisters a previously registered CA or CRL update listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObserversHandler

public ObserversHandler()

ObserversHandler

public ObserversHandler(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(String url,
                            String type,
                            StoreUpdateListener.Severity level,
                            Exception e)

removeAllObservers

public void removeAllObservers()


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