simulator
Class ServerAmbient

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--simulator.ServerAmbient

class ServerAmbient
extends java.lang.Thread

This class is used to comunicate between the agents their position (velocity...) and the position of all other object there's in the simulator. It used a GenericServerAmbient to do this, so you can implement the function you need.

See Also:
GenericServerAmbient

Field Summary
protected  Queue[] clientQueue
          In this tile the agents send required about information useful to calculate their position and the ServerAmbient store and read information using this tile.
protected  GenericServerAmbient GSA
          Instances your server ambient processes
protected  java.util.Hashtable state
          Rappresents the dinamic state of the simulation ambient.
 
Fields inherited from class java.lang.Thread
contextClassLoader, daemon, eetop, group, inheritedAccessControlContext, MAX_PRIORITY, MIN_PRIORITY, name, NORM_PRIORITY, priority, single_step, stillborn, stopThreadPermission, target, threadInitNumber, threadQ, values
 
Constructor Summary
ServerAmbient(java.util.Hashtable state, Queue[] clientQueue, GenericServerAmbient GSA)
          Initialize object and start thread
 
Method Summary
 void run()
          This thread loop in a runTask of GenericServerAmbient for making your actions, but first time it call your init.
 
Methods inherited from class java.lang.Thread
, activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, exit, getContextClassLoader, getName, getPriority, getThreadGroup, init, interrupt, interrupt0, interrupted, isAlive, isDaemon, isInterrupted, isInterrupted, join, join, join, nextThreadNum, registerNatives, resume, resume0, setContextClassLoader, setDaemon, setName, setPriority, setPriority0, sleep, sleep, start, stop, stop, stop0, suspend, suspend0, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

state

protected java.util.Hashtable state
Rappresents the dinamic state of the simulation ambient. The information that are stored in it are required by the agents for calculating new positions.

clientQueue

protected Queue[] clientQueue
In this tile the agents send required about information useful to calculate their position and the ServerAmbient store and read information using this tile.

GSA

protected GenericServerAmbient GSA
Instances your server ambient processes
Constructor Detail

ServerAmbient

public ServerAmbient(java.util.Hashtable state,
                     Queue[] clientQueue,
                     GenericServerAmbient GSA)
Initialize object and start thread
Parameters:
state - the state of all object in virtual ambient
clientQueue - the tile where information must be send between agents and server
GSA - your class that execute the server ambient processes
Method Detail

run

public void run()
This thread loop in a runTask of GenericServerAmbient for making your actions, but first time it call your init.
Overrides:
run in class java.lang.Thread
See Also:
GenericServerAmbient