cad.simcad.objectserver.spec.cac.network
Interface NetworkAcceptor

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
RMINetworkAcceptor, RMINetworkAcceptor_Stub

public interface NetworkAcceptor
extends java.rmi.Remote

Interface of the Dispatcher, server-side.

Author:
Charles-Philip Bentley

Method Summary
 boolean acceptConnection(CADConnection c)
          Method for accepting connections
 void closeConnection(CADConnection c)
          Close a connection.
 void recieveData(FieldSet fs)
          Method for recieving data from a NetworkConnector
 EmergencyVehicule registerNewEmergencyVehicle()
          Ask to CAC to register a new EmergencyVehicle in its Persistent Data storage returns the newly create EmergencyVehicule
 void updateWorldMap(AbstractMap am)
          Update the Map ued by the Main Server.
 

Method Detail

acceptConnection

public boolean acceptConnection(CADConnection c)
                         throws java.rmi.RemoteException
Method for accepting connections

Pre:
a CADConnection object
Returns:
true if connection is accepted false if connection is not accepted
java.rmi.RemoteException
Post:
The connection is accepted or not, depending of server parameters and CADConnection information.

recieveData

public void recieveData(FieldSet fs)
                 throws java.rmi.RemoteException
Method for recieving data from a NetworkConnector

Pre:
Connection established
java.rmi.RemoteException
Post:
FieldSet fs is sent to the user of this NetworkAcceptor

closeConnection

public void closeConnection(CADConnection c)
                     throws java.rmi.RemoteException
Close a connection. Dump it

Parameters:
c - a CADConnection object
Pre:
The CADConnection is known by the NetworkAcceptor.
java.rmi.RemoteException
Post:
The NetworkAcceptor has closed the connection.

registerNewEmergencyVehicle

public EmergencyVehicule registerNewEmergencyVehicle()
                                              throws java.rmi.RemoteException,
                                                     PersistentDataException
Ask to CAC to register a new EmergencyVehicle in its Persistent Data storage returns the newly create EmergencyVehicule

java.rmi.RemoteException
PersistentDataException

updateWorldMap

public void updateWorldMap(AbstractMap am)
                    throws java.rmi.RemoteException
Update the Map ued by the Main Server. For example if a new road has been built

Pre:
-
java.rmi.RemoteException
Post:
The map used by the main server is now am

Logo

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