|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbe.ac.ulg.montefiore.run.totem.trafficMatrix.model.impl.AbstractLinkLoadComputer
public abstract class AbstractLinkLoadComputer
Provide default implementation for some functionnalities of the LinkLoadComputer.
Creation date: 28/01/2008
| Field Summary | |
|---|---|
protected LinkLoadComputerInvalidator |
changeListener
The object that listens to events and invalidate the LinkLoadComputer |
protected Domain |
domain
The associated domain |
| Constructor Summary | |
|---|---|
protected |
AbstractLinkLoadComputer(Domain domain)
Creates a new LinkLoadComputer with the default change listener ( LinkLoadComputerInvalidator. |
protected |
AbstractLinkLoadComputer(Domain domain,
LinkLoadComputerInvalidator changeListener)
Creates a new LinkLoadComputer with the given change listener. |
| Method Summary | |
|---|---|
void |
addListener(LinkLoadComputerListener listener)
Add a listener. |
protected void |
dataChanged()
Call this method when data has been recomputed, signals a change in the data. |
void |
destroy()
Destroy the linkLoadComputer: remove all listeners, invalidate the data and stop listening to events. |
Domain |
getDomain()
Returns the domain associated. |
void |
invalidate()
Mark the data as outdated and signals the listeners if the validity has changed. |
boolean |
isUpToDate()
Returns true if the internal data are up-to-date |
void |
removeListener(LinkLoadComputerListener listener)
Remove a listener. |
protected void |
setUptoDate(boolean upToDate)
If the data validity has changed, also signals the listeners. |
void |
startListening()
add the change listener to the domain, and to the currently used traffic matrices |
void |
stopListening()
Remove the listener from the domain and from the currently used traffic matrices |
void |
update()
Call LinkLoadComputer.recompute() if the data is not up-to-date, else do nothing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface be.ac.ulg.montefiore.run.totem.trafficMatrix.model.LinkLoadComputer |
|---|
detachData, equals, getData, getShortName, getTrafficMatrices, hashCode, recompute |
| Field Detail |
|---|
protected Domain domain
protected LinkLoadComputerInvalidator changeListener
| Constructor Detail |
|---|
protected AbstractLinkLoadComputer(Domain domain)
LinkLoadComputerInvalidator.
domain -
protected AbstractLinkLoadComputer(Domain domain,
LinkLoadComputerInvalidator changeListener)
domain - changeListener - | Method Detail |
|---|
public void addListener(LinkLoadComputerListener listener)
addListener in interface LinkLoadComputerlistener - public void removeListener(LinkLoadComputerListener listener)
removeListener in interface LinkLoadComputerlistener - public void destroy()
destroy in interface LinkLoadComputerpublic void startListening()
startListening in interface LinkLoadComputerpublic void stopListening()
stopListening in interface LinkLoadComputerpublic void update()
LinkLoadComputer.recompute() if the data is not up-to-date, else do nothing.
update in interface LinkLoadComputerprotected void dataChanged()
public Domain getDomain()
LinkLoadComputer
getDomain in interface LinkLoadComputerpublic boolean isUpToDate()
LinkLoadComputer
isUpToDate in interface LinkLoadComputerprotected void setUptoDate(boolean upToDate)
upToDate - public void invalidate()
invalidate in interface LinkLoadComputer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||