public class TraceRecorder extends Object implements MovementListener, SelectionListener, TopologyListener, StartListener
Constructor and Description |
---|
TraceRecorder(Topology tp,
TraceFileWriter traceFileWriter) |
Modifier and Type | Method and Description |
---|---|
void |
onMovement(Node node)
Notifies the underlying listener that a node has moved.
|
void |
onNodeAdded(Node node)
Notifies the underlying listener that a node has been added to the
topology.
|
void |
onNodeRemoved(Node node)
Notifies the underlying listener that a node has been removed to the
topology.
|
void |
onSelection(Node node)
Notifies the underlying listener that a node has selected.
|
void |
onStart()
Notifies that a restart was requested on this topology.
|
void |
start() |
void |
stopAndWrite(String filename) |
public TraceRecorder(Topology tp, TraceFileWriter traceFileWriter)
public void onStart()
StartListener
onStart
in interface StartListener
public void onMovement(Node node)
MovementListener
onMovement
in interface MovementListener
node
- The node.public void onSelection(Node node)
SelectionListener
onSelection
in interface SelectionListener
node
- The selected node.public void onNodeAdded(Node node)
TopologyListener
onNodeAdded
in interface TopologyListener
node
- The added node.public void onNodeRemoved(Node node)
TopologyListener
onNodeRemoved
in interface TopologyListener
node
- The removed node.public void start()