gecco.server.qmanager
Class QManager

java.lang.Object
  |
  +--gecco.server.qmanager.QManager
All Implemented Interfaces:
Runnable, SignalRunnable

public class QManager
extends Object
implements SignalRunnable

This class manages the queue of AutomatonEvents and QueuedAutomatons.

Author:
Henrik Bäärnielm, Karl Hasselström, Henrik Hägerström

Field Summary
 
Fields inherited from interface gecco.util.SignalRunnable
SIGKILL, SIGNONE, SIGPAUSE, SIGQUIT, SIGRESUME
 
Constructor Summary
QManager()
          Constructor for the QManager object
 
Method Summary
 void addEventToQueue(AutomatonEvent event, int x, int y)
          Adds an event to the event queue
 LinkedList getAutomatonEventQueue()
          Gets the queue of AutomatonEvents
 TreeSet getAutomatonQueue()
          Gets the queue of automatons
 void run()
          Main processing method for the QManager object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QManager

public QManager()
Constructor for the QManager object

Method Detail

getAutomatonQueue

public TreeSet getAutomatonQueue()
Gets the queue of automatons

Returns:
The queue

getAutomatonEventQueue

public LinkedList getAutomatonEventQueue()
Gets the queue of AutomatonEvents

Returns:
The queue

addEventToQueue

public void addEventToQueue(AutomatonEvent event,
                            int x,
                            int y)
Adds an event to the event queue

Parameters:
event - The event to be added.
x - The x coordinate of the position of the event.
y - The y coordinate of the position of the event.

run

public void run()
Main processing method for the QManager object

Specified by:
run in interface Runnable