visidia.simulation.process
Class SensorMover

java.lang.Object
  extended by visidia.simulation.process.SensorMover
All Implemented Interfaces:
java.io.Serializable

public abstract class SensorMover
extends java.lang.Object
implements java.io.Serializable

Abstract class providing different moving types for the sensors. You should subclass this class to create your own style of move.

See Also:
Serialized Form

Constructor Summary
SensorMover()
          Instantiates a new sensor mover.
 
Method Summary
abstract  SupportVertex findWay(Sensor sensor)
          Returns the ID of the vertex neighbor to which the sensor will go.
 void move(Sensor sensor)
          Moves the sensor to the next vertex using the sensor's local mover.
 void move(Sensor sensor, SupportVertex vertexTo)
          Moves the sensor to a specified vertex neighbor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SensorMover

public SensorMover()
Instantiates a new sensor mover.

Method Detail

move

public void move(Sensor sensor)
          throws java.lang.InterruptedException,
                 MoveException
Moves the sensor to the next vertex using the sensor's local mover.

Parameters:
sensor - the sensor
Throws:
java.lang.InterruptedException - the interrupted exception
MoveException - the move exception

move

public final void move(Sensor sensor,
                       SupportVertex vertexTo)
                throws java.lang.InterruptedException
Moves the sensor to a specified vertex neighbor.

Parameters:
sensor - the sensor
vertexTo - the vertex to
Throws:
java.lang.InterruptedException - the interrupted exception

findWay

public abstract SupportVertex findWay(Sensor sensor)
                               throws MoveException
Returns the ID of the vertex neighbor to which the sensor will go. This method needs to be specialized in the sub-classes.

Parameters:
sensor - the sensor
Returns:
the support vertex
Throws:
MoveException - the move exception