cad.simcad.main_server
Class APSSI

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--cad.simcad.main_server.APSSI
All Implemented Interfaces:
APSS, java.lang.Runnable

public class APSSI
extends java.lang.Thread
implements APSS

2 Possibilities for the implementation : 1- During the creation, we start a new Thread. This thread updates contiuously the internal Map thanks to GPSSrv and MDTSrv 2- Update on demand each time the getMap() method is called

Author:
CP

Field Summary
protected  GPSCentralizer g
           
static java.lang.String GPS_SERVER
           
static java.lang.String GPS_SERVER_PORT
           
protected  MDTCentralizer m
           
static java.lang.String MDT_SERVER
           
static java.lang.String MDT_SERVER_PORT
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
APSSI(CacMediatorI cacm)
           
 
Method Summary
 java.util.Map getAllFreeVehicles()
          Returns a mapping of Ids to GPSPositions Ids correspond to EmergencyVehicule that have a free status
 AbstractMap getMap()
          Returns an AbstractMap object, the interface to the CityMap with its ambulances on it
 java.util.Map getPlaceMappedToFreeUsers()
          Returns a mapping of PathPlace to PathUsers Ids correspond to EmergencyVehicule that have a free status
 void run()
           
 void updateMap(AbstractMap am)
          update the Map
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GPS_SERVER

public static java.lang.String GPS_SERVER

MDT_SERVER

public static java.lang.String MDT_SERVER

GPS_SERVER_PORT

public static java.lang.String GPS_SERVER_PORT

MDT_SERVER_PORT

public static java.lang.String MDT_SERVER_PORT

m

protected MDTCentralizer m

g

protected GPSCentralizer g
Constructor Detail

APSSI

public APSSI(CacMediatorI cacm)
      throws java.rmi.RemoteException
Method Detail

getMap

public AbstractMap getMap()
Returns an AbstractMap object, the interface to the CityMap with its ambulances on it

Specified by:
getMap in interface APSS
Pre:
-
Returns:
an AbstractMap
Post:
The Internal Representation of the positions as an AbstractMap

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

getAllFreeVehicles

public java.util.Map getAllFreeVehicles()
Returns a mapping of Ids to GPSPositions Ids correspond to EmergencyVehicule that have a free status


getPlaceMappedToFreeUsers

public java.util.Map getPlaceMappedToFreeUsers()
Returns a mapping of PathPlace to PathUsers Ids correspond to EmergencyVehicule that have a free status

Specified by:
getPlaceMappedToFreeUsers in interface APSS

updateMap

public void updateMap(AbstractMap am)
Description copied from interface: APSS
update the Map

Specified by:
updateMap in interface APSS

Logo

With the help of www.sourceforge.net and www.info.ucl.ac.be