org.gscg.common.interactionlayer
Class ThreadedEventProducer

java.lang.Object
  extended bynl.tudelft.simulation.event.EventProducer
      extended byorg.gscg.common.interactionlayer.ThreadedEventProducer
All Implemented Interfaces:
nl.tudelft.simulation.event.EventProducerInterface, java.io.Serializable
Direct Known Subclasses:
DistributorSingleUserInteractionLayer, GameLeaderInteractionLayer, ManufacturerSingleUserInteractionLayer

public class ThreadedEventProducer
extends nl.tudelft.simulation.event.EventProducer

The ThreadedEventProducer extends the EventProducer. A different thread than the one used in the simulation is used to fire events to a client-side EventListener. Whenever the processing of an event client-side takes a long time, the simulation will continue and not wait. Meanwhile, other events are stored until the 'slow' event has been processed client-side. After this, the ThreadedEventProducer will try to catch up.

Copyright (c) 2003-2005 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information www.simulation.tudelft.nl . The source code and binary code of this software is proprietary information of Delft University of Technology.

Since:
1.0.0
Version:
$Revision: 1.1 $ $Date: 2005/06/16 12:33:58 $
Author:
Stijn-Pieter van Houten , Alexander Verbraeck
See Also:
EventProducer, Serialized Form

Field Summary
static DijkstraSemaphore DIJKSTRASEMAPHORE
          the dijkstra semaphore, value is adjusted in the model class
 
Fields inherited from class nl.tudelft.simulation.event.EventProducer
listeners
 
Fields inherited from interface nl.tudelft.simulation.event.EventProducerInterface
FIRST_POSITION, LAST_POSITION
 
Constructor Summary
ThreadedEventProducer()
          constructs a new ThreadedEventProducer
 
Method Summary
protected  nl.tudelft.simulation.event.EventInterface fireEvent(nl.tudelft.simulation.event.EventListenerInterface listener, nl.tudelft.simulation.event.EventInterface event)
           
 
Methods inherited from class nl.tudelft.simulation.event.EventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, getEventTypes, removeAllListeners, removeAllListeners, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DIJKSTRASEMAPHORE

public static transient DijkstraSemaphore DIJKSTRASEMAPHORE
the dijkstra semaphore, value is adjusted in the model class

Constructor Detail

ThreadedEventProducer

public ThreadedEventProducer()
constructs a new ThreadedEventProducer

Method Detail

fireEvent

protected nl.tudelft.simulation.event.EventInterface fireEvent(nl.tudelft.simulation.event.EventListenerInterface listener,
                                                               nl.tudelft.simulation.event.EventInterface event)
                                                        throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException
See Also:
EventProducer.fireEvent(nl.tudelft.simulation.event.EventListenerInterface, nl.tudelft.simulation.event.EventInterface)


Copyright © 2002-2005 Delft University of Technology, the Netherlands. All Rights Reserved.