be.ac.ulg.montefiore.run.totem.domain.model.impl
Class DomainChangeObserverImpl

java.lang.Object
  extended by be.ac.ulg.montefiore.run.totem.domain.model.impl.DomainChangeObserverImpl
All Implemented Interfaces:
DomainChangeObserver

public class DomainChangeObserverImpl
extends java.lang.Object
implements DomainChangeObserver

The DomainChangeObserverImpl is associated to a Domain and notify to all listeners the Domain changes.

Creation date: 12-Jan-2005 18:12:00

Author:
Fabian Skivee (skivee@run.montefiore.ulg.ac.be), Jean Lepropre (lepropre@run.montefiore.ulg.ac.be)

Field Summary
 
Fields inherited from interface be.ac.ulg.montefiore.run.totem.domain.model.DomainChangeObserver
HIGHEST_PRIORITY, LOWEST_PRIORITY
 
Constructor Summary
DomainChangeObserverImpl(Domain domain)
           
 
Method Summary
 void addListener(DomainChangeListener l)
          Adds a listener with the lowest priority.
 void addListener(DomainChangeListener l, int priority)
          Adds a listener with the specified priority.
 int getNbListeners()
          return the total number of listeners
 int getNbListeners(int priority)
          return the number of listeners for all priorites inferior or equal to priority
 void notifyAddLink(Link link)
          Notify link add
 void notifyAddLsp(Lsp lsp)
          Notify LSP add
 void notifyAddNode(Node node)
          Notify node add
 void notifyLinkBandwidthChange(Link link)
          Notify link bandwidth change
 void notifyLinkDelayChange(Link link)
          Notify link delay change
 void notifyLinkMetricChange(Link link)
          Notify link metric change
 void notifyLinkReservedBandwidthChange(Link link)
          Notify link reserved bandwidth change
 void notifyLinkStatusChange(Link link)
          Notify link status change
 void notifyLinkTeMetricChange(Link link)
          Notify link TE metric change
 void notifyLspReservationChange(Lsp lsp)
          Notify LSP reservation change
 void notifyLspWorkingPathChange(Lsp lsp)
          Notify a change in the working path
 void notifyNodeLocationChange(Node node)
          Notify a node location change
 void notifyNodeStatusChange(Node node)
          Notify node status change
 void notifyRemoveLink(Link link)
          Notify link remove
 void notifyRemoveLsp(Lsp lsp)
          Notify LSP remove
 void notifyRemoveNode(Node node)
          Notify node remove
 void notifyRerouteLsp(Lsp lsp)
          Notify the fact that a LSP must be rerouted.
 void removeAllListeners()
          Removes all listeners.
 void removeListener(DomainChangeListener l)
          Removes the listener l.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DomainChangeObserverImpl

public DomainChangeObserverImpl(Domain domain)
Method Detail

addListener

public void addListener(DomainChangeListener l)
Description copied from interface: DomainChangeObserver
Adds a listener with the lowest priority. This method does nothing if l is already registered.

Specified by:
addListener in interface DomainChangeObserver
Parameters:
l - The listener to add.

addListener

public void addListener(DomainChangeListener l,
                        int priority)
                 throws DomainChangeObserverException
Description copied from interface: DomainChangeObserver
Adds a listener with the specified priority. This method does nothing if l is already registered.

Specified by:
addListener in interface DomainChangeObserver
Parameters:
l - The listener to add.
priority - The priority of the listener. This must be greater or equal than LOWEST_PRIORITY and lower or equal than HIGHEST_PRIORITY.
Throws:
DomainChangeObserverException - If priority is invalid.

removeListener

public void removeListener(DomainChangeListener l)
Description copied from interface: DomainChangeObserver
Removes the listener l. This method does nothing if l is not registered.

Specified by:
removeListener in interface DomainChangeObserver
Parameters:
l - The listener to remove.

removeAllListeners

public void removeAllListeners()
Description copied from interface: DomainChangeObserver
Removes all listeners.

Specified by:
removeAllListeners in interface DomainChangeObserver

getNbListeners

public int getNbListeners(int priority)
Description copied from interface: DomainChangeObserver
return the number of listeners for all priorites inferior or equal to priority

Specified by:
getNbListeners in interface DomainChangeObserver
Returns:

getNbListeners

public int getNbListeners()
Description copied from interface: DomainChangeObserver
return the total number of listeners

Specified by:
getNbListeners in interface DomainChangeObserver
Returns:

notifyAddNode

public void notifyAddNode(Node node)
Notify node add

Specified by:
notifyAddNode in interface DomainChangeObserver
Parameters:
node -

notifyRemoveNode

public void notifyRemoveNode(Node node)
Notify node remove

Specified by:
notifyRemoveNode in interface DomainChangeObserver
Parameters:
node -

notifyNodeStatusChange

public void notifyNodeStatusChange(Node node)
Notify node status change

Specified by:
notifyNodeStatusChange in interface DomainChangeObserver
Parameters:
node -

notifyNodeLocationChange

public void notifyNodeLocationChange(Node node)
Description copied from interface: DomainChangeObserver
Notify a node location change

Specified by:
notifyNodeLocationChange in interface DomainChangeObserver

notifyAddLink

public void notifyAddLink(Link link)
Notify link add

Specified by:
notifyAddLink in interface DomainChangeObserver
Parameters:
link -

notifyRemoveLink

public void notifyRemoveLink(Link link)
Notify link remove

Specified by:
notifyRemoveLink in interface DomainChangeObserver
Parameters:
link -

notifyLinkStatusChange

public void notifyLinkStatusChange(Link link)
Notify link status change

Specified by:
notifyLinkStatusChange in interface DomainChangeObserver
Parameters:
link -

notifyLinkMetricChange

public void notifyLinkMetricChange(Link link)
Notify link metric change

Specified by:
notifyLinkMetricChange in interface DomainChangeObserver
Parameters:
link -

notifyLinkTeMetricChange

public void notifyLinkTeMetricChange(Link link)
Notify link TE metric change

Specified by:
notifyLinkTeMetricChange in interface DomainChangeObserver
Parameters:
link -

notifyLinkBandwidthChange

public void notifyLinkBandwidthChange(Link link)
Notify link bandwidth change

Specified by:
notifyLinkBandwidthChange in interface DomainChangeObserver
Parameters:
link -

notifyLinkReservedBandwidthChange

public void notifyLinkReservedBandwidthChange(Link link)
Notify link reserved bandwidth change

Specified by:
notifyLinkReservedBandwidthChange in interface DomainChangeObserver
Parameters:
link -

notifyLinkDelayChange

public void notifyLinkDelayChange(Link link)
Notify link delay change

Specified by:
notifyLinkDelayChange in interface DomainChangeObserver
Parameters:
link -

notifyAddLsp

public void notifyAddLsp(Lsp lsp)
Notify LSP add

Specified by:
notifyAddLsp in interface DomainChangeObserver
Parameters:
lsp -

notifyRemoveLsp

public void notifyRemoveLsp(Lsp lsp)
Notify LSP remove

Specified by:
notifyRemoveLsp in interface DomainChangeObserver
Parameters:
lsp -

notifyRerouteLsp

public void notifyRerouteLsp(Lsp lsp)
Notify the fact that a LSP must be rerouted.

Specified by:
notifyRerouteLsp in interface DomainChangeObserver
Parameters:
lsp - The LSP to reroute.

notifyLspReservationChange

public void notifyLspReservationChange(Lsp lsp)
Notify LSP reservation change

Specified by:
notifyLspReservationChange in interface DomainChangeObserver
Parameters:
lsp -

notifyLspWorkingPathChange

public void notifyLspWorkingPathChange(Lsp lsp)
Notify a change in the working path

Specified by:
notifyLspWorkingPathChange in interface DomainChangeObserver
Parameters:
lsp -


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