|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Manages the demonstration of the algorithm of a project. Also provides the link to the graphical visualization. The demonstration will run in an extra thread.
Method Summary | |
void |
addActiveMessage(Message message)
Adds a message to the active messages. |
void |
addActiveNode(Node node)
Adds a node to the active nodes. |
Message |
createMessage(Node sender,
Node receiver,
Object payload)
Creates a new message. |
Statistics |
getCurrentStatistics()
Returns up-to-date statistics about the demo. |
boolean |
isPaused()
Returns whether the demo is paused. |
boolean |
isRunning()
Returns whether the demo is running (and not paused). |
boolean |
isStopped()
Returns whether the demo is stopped. |
void |
pauseActiveNode(Node node,
long timeInMillis)
Removes a node from the active nodes for a certain time. |
void |
removeActiveNode(Node node)
Removes a node from the active nodes. |
Method Detail |
public boolean isStopped()
public boolean isPaused()
public boolean isRunning()
public void addActiveNode(Node node)
node
- the nodepublic void pauseActiveNode(Node node, long timeInMillis)
node
- the nodetimeInMillis
- time in milliseconds after which the node will be
activatedpublic void removeActiveNode(Node node)
node
- the nodepublic void addActiveMessage(Message message)
message
- the messagepublic Message createMessage(Node sender, Node receiver, Object payload)
sender
- the node that sends the messagereceiver
- the node that shall receive the messagepayload
- possible payload that the message carries
IllegalArgumentException
- if the nodes are not neighbouredpublic Statistics getCurrentStatistics()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |