be.ac.ulg.montefiore.run.totem.repository.facade
Class RepositoryManagerObserver

java.lang.Object
  extended by be.ac.ulg.montefiore.run.totem.repository.facade.RepositoryManagerObserver
Direct Known Subclasses:
RepositoryManager

public class RepositoryManagerObserver
extends java.lang.Object

This class is used to notify all listeners of changes in the RepositoryManager (i.e. algo started, algo stopped)

Creation date: 9 janv. 2006

Author:
Ga�l Monfort (monfort@run.montefiore.ulg.ac.be)
See Also:
RepositoryManagerListener, RepositoryManager

Constructor Summary
RepositoryManagerObserver()
           
 
Method Summary
 void addListener(RepositoryManagerListener l)
          Add a listener to the list of listeners.
 int getNbListeners()
          return the number of registered listeners
protected  void notifyStartAlgo(TotemAlgorithm algo)
          New algorithm started
protected  void notifyStopAlgo(TotemAlgorithm algo)
          Algo stopped
 void removeListener(RepositoryManagerListener l)
          Remove a listener from the list of registered listeners.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepositoryManagerObserver

public RepositoryManagerObserver()
Method Detail

addListener

public void addListener(RepositoryManagerListener l)
Add a listener to the list of listeners. This method does nothing if the listener is already registered.

Parameters:
l - the listener to add

removeListener

public void removeListener(RepositoryManagerListener l)
Remove a listener from the list of registered listeners. This method has no effect if the listener is not registered.

Parameters:
l -

getNbListeners

public int getNbListeners()
return the number of registered listeners

Returns:

notifyStartAlgo

protected void notifyStartAlgo(TotemAlgorithm algo)
New algorithm started

Parameters:
algo - the started algorithm

notifyStopAlgo

protected void notifyStopAlgo(TotemAlgorithm algo)
Algo stopped

Parameters:
algo - A reference to the stopped algo


Copyright © 2004-2007 Research Unit in Networking, All Rights Reserved.