visidia.simulation.command
Interface CommandListener

All Superinterfaces:
java.util.EventListener
All Known Subinterfaces:
SensorCommandListener

public interface CommandListener
extends java.util.EventListener

The listener interface for receiving command events. The class that is interested in processing a command event implements this interface, and the object created with that class is registered with a component using the component's addCommandListener method. When the command event occurs, that object's appropriate method is invoked.


Method Summary
 void agentDead(int agentId, VisidiaEvent event)
          Agent dead.
 void agentMoved(int agentId, Vertex origin, Vertex destination, VisidiaEvent event)
          Agent moved.
 void edgePropertyChanged(Edge edge, VisidiaProperty property)
          Edge property changed.
 void edgeStateChanged(EdgeState newEdgeState, Vertex v1, Vertex v2)
          Edge state changed.
 void messageSent(int senderId, int receiverId, Message msg, VisidiaEvent event)
          Message sent.
 void nodePropertyChanged(int vertexId, VisidiaProperty property)
          Node property changed.
 void pulseChanged(ProcessType sender, int pulse)
          Pulse changed.
 void simulationTerminated()
          Simulation terminated.
 

Method Detail

messageSent

void messageSent(int senderId,
                 int receiverId,
                 Message msg,
                 VisidiaEvent event)
Message sent.

Parameters:
senderId - the sender id
receiverId - the receiver id
msg - the message
event - the event

edgeStateChanged

void edgeStateChanged(EdgeState newEdgeState,
                      Vertex v1,
                      Vertex v2)
Edge state changed.

Parameters:
newEdgeState - the new edge state
v1 - the first vertex
v2 - the second vertex

nodePropertyChanged

void nodePropertyChanged(int vertexId,
                         VisidiaProperty property)
Node property changed.

Parameters:
vertexId - the vertex id
property - the property

edgePropertyChanged

void edgePropertyChanged(Edge edge,
                         VisidiaProperty property)
Edge property changed.

Parameters:
edge - the edge
property - the property

simulationTerminated

void simulationTerminated()
Simulation terminated.


agentMoved

void agentMoved(int agentId,
                Vertex origin,
                Vertex destination,
                VisidiaEvent event)
Agent moved.

Parameters:
agentId - the agent id
origin - the origin
destination - the destination
event - the event

agentDead

void agentDead(int agentId,
               VisidiaEvent event)
Agent dead.

Parameters:
agentId - the agent id
event - the event

pulseChanged

void pulseChanged(ProcessType sender,
                  int pulse)
Pulse changed.

Parameters:
sender - the sender
pulse - the pulse