visidia.simulation.server
Class Server

java.lang.Object
  extended by visidia.simulation.server.Server
Direct Known Subclasses:
LocalServer, RemoteServer

public abstract class Server
extends java.lang.Object

This is the abstract base class to represent a server in visidia. A server is the communication gateway between console and process.


Field Summary
protected  Console console
          The console.
 
Constructor Summary
protected Server(Console console)
          Instantiates a new server.
 
Method Summary
 void addProcess(ProcessType proc)
          Adds a process.
 Console getConsole()
          Gets the console.
 ProcessType getProcess(int processId)
          Gets the process.
abstract  void sendToConsole(Command cmd)
          Sends a command to the console.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

console

protected Console console
The console.

Constructor Detail

Server

protected Server(Console console)
Instantiates a new server.

Parameters:
console - the console
Method Detail

sendToConsole

public abstract void sendToConsole(Command cmd)
Sends a command to the console.

Parameters:
cmd - the command

addProcess

public void addProcess(ProcessType proc)
Adds a process.

Parameters:
proc - the process

getConsole

public Console getConsole()
Gets the console.

Returns:
the console

getProcess

public ProcessType getProcess(int processId)
Gets the process.

Parameters:
processId - the process id
Returns:
the process