|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnl.tudelft.simulation.event.EventProducer
org.gscg.common.interactionlayer.ThreadedEventProducer
org.gscg.gameleader.interactionlayer.GameLeaderInteractionLayer
The game leader interaction layer is the layer between server-side game control logic and a client-side game administrator application.
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.
| Field Summary | |
static nl.tudelft.simulation.event.EventType |
ANIMATION_UPDATE_EVENT
the animation changed event |
static nl.tudelft.simulation.event.EventType |
OBJECT_ADDED_EVENT
the object added event |
static nl.tudelft.simulation.event.EventType |
OBJECT_REMOVED_EVENT
the object removed event |
| Fields inherited from class org.gscg.common.interactionlayer.ThreadedEventProducer |
DIJKSTRASEMAPHORE |
| Fields inherited from class nl.tudelft.simulation.event.EventProducer |
listeners |
| Fields inherited from interface nl.tudelft.simulation.dsol.simulators.DESSSimulatorInterface |
DEFAULT_TIME_STEP, TIME_STEP_CHANGED_EVENT |
| Fields inherited from interface nl.tudelft.simulation.dsol.simulators.SimulatorInterface |
END_OF_REPLICATION_EVENT, START_EVENT, START_REPLICATION_EVENT, STEP_EVENT, STOP_EVENT, TIME_CHANGED_EVENT, WARMUP_EVENT |
| Fields inherited from interface nl.tudelft.simulation.event.EventProducerInterface |
FIRST_POSITION, LAST_POSITION |
| Constructor Summary | |
GameLeaderInteractionLayer(java.lang.String id)
constructs a new GameLeaderInteractionLayer |
|
| Method Summary | |
void |
addEventTypeSentByClient(nl.tudelft.simulation.event.EventType eventType)
Method addEventTypeSentByClient. |
void |
addEventTypeToAnnounceList(nl.tudelft.simulation.event.EventType eventType,
AnnounceInterface announceObject)
Method addEventTypeToAnnounceList. |
void |
addStatisticEventType(nl.tudelft.simulation.event.EventType eventType)
Method addStatisticEventType adds an event to a set with event types only used for statistical updates. |
java.util.Map |
getActorKeys()
|
long |
getAnimationDelay()
|
java.util.Map |
getBindings()
|
void |
getCache(java.lang.Object remoteEventListener,
nl.tudelft.simulation.event.EventType eventType,
boolean cache)
this method is used by a remote client to indicate that it is 'online' the server side object is then able to subscribe to client side events and to send cached data |
java.lang.String |
getId()
|
IntrospectionData |
getIntrospectedObjectData(java.lang.String key)
Method getIntrospectedObjectData returns the date of the object which has been introspected on a client-side animationpanel. |
nl.tudelft.simulation.dsol.experiment.Replication |
getReplication()
|
double |
getSimulatorTime()
|
nl.tudelft.simulation.event.EventType[] |
getStatisticEventTypes()
|
double |
getTimeStep()
|
int |
getTotalNumberOfDays()
|
void |
initialize(nl.tudelft.simulation.dsol.experiment.Replication replication)
|
boolean |
isRunning()
|
boolean |
login(nl.tudelft.simulation.event.remote.RemoteEventListenerInterface client)
|
void |
namingExceptionThrown(javax.naming.event.NamingExceptionEvent evt)
|
void |
notify(nl.tudelft.simulation.event.EventInterface event)
|
void |
objectAdded(javax.naming.event.NamingEvent namingEvent)
|
void |
objectRemoved(javax.naming.event.NamingEvent namingEvent)
|
void |
objectRenamed(javax.naming.event.NamingEvent evt)
|
void |
parseExperiment(org.jdom.Element experimentElement)
method parseExperiment |
void |
removeAnimationRefreshDelayListener(nl.tudelft.simulation.event.remote.RemoteEventListenerInterface listener)
removes a listener for a refresh delay |
boolean |
removeListener(nl.tudelft.simulation.event.EventListenerInterface listener,
nl.tudelft.simulation.event.EventType eventType)
|
void |
saveSimulation()
saves a simulation to a persitent storage |
void |
setAnimationDelay(long arg0)
|
void |
setAnimationRefreshDelay(double times,
nl.tudelft.simulation.event.remote.RemoteEventListenerInterface listener)
sets the refresh delay for the client side animation panel; the server responds with a GameLeaderInteractionLayer.ANIMATION_UPDATE_EVENT |
void |
setTimeStep(double arg0)
|
void |
start()
|
void |
step()
|
void |
stop()
|
void |
updateIntrospectedObject(IntrospectionData data)
Method updateIntrospectedObject updates an introspected object. |
| Methods inherited from class org.gscg.common.interactionlayer.ThreadedEventProducer |
fireEvent |
| 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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface nl.tudelft.simulation.event.EventProducerInterface |
addListener, addListener, addListener, addListener, getEventTypes |
| Field Detail |
public static final nl.tudelft.simulation.event.EventType OBJECT_ADDED_EVENT
public static final nl.tudelft.simulation.event.EventType OBJECT_REMOVED_EVENT
public static final nl.tudelft.simulation.event.EventType ANIMATION_UPDATE_EVENT
| Constructor Detail |
public GameLeaderInteractionLayer(java.lang.String id)
id - the id of the game administrator| Method Detail |
public void notify(nl.tudelft.simulation.event.EventInterface event)
throws java.rmi.RemoteException
notify in interface nl.tudelft.simulation.event.EventListenerInterfacejava.rmi.RemoteExceptionEventListenerInterface.notify(nl.tudelft.simulation.event.EventInterface)public void addStatisticEventType(nl.tudelft.simulation.event.EventType eventType)
eventType - the event type to add
public void getCache(java.lang.Object remoteEventListener,
nl.tudelft.simulation.event.EventType eventType,
boolean cache)
throws java.rmi.RemoteException
GlobalInteractionLayerInterface
getCache in interface GlobalInteractionLayerInterfaceremoteEventListener - the remote event producer or the remote event listener, may
be nulleventType - the event type given as an argument for the announce
method, may not be nullcache - true if this method is called during initialization of a
client user interface; false in case of announcing for a statistic
java.rmi.RemoteException - thrown in case of a network errorGlobalInteractionLayerInterface.getCache(java.lang.Object,
nl.tudelft.simulation.event.EventType, boolean)public boolean login(nl.tudelft.simulation.event.remote.RemoteEventListenerInterface client)
login in interface GlobalInteractionLayerInterfaceclient - The client to login
GlobalInteractionLayerInterface.login(nl.tudelft.simulation.event.remote.RemoteEventListenerInterface)
public void parseExperiment(org.jdom.Element experimentElement)
throws java.rmi.RemoteException
ExperimentInterface
parseExperiment in interface ExperimentInterfaceexperimentElement - the client-side parsed experiment as an element;
should be serializable
java.rmi.RemoteException - thrown in case of network errorExperimentInterface.parseExperiment(org.jdom.Element)
public double getSimulatorTime()
throws java.rmi.RemoteException
getSimulatorTime in interface nl.tudelft.simulation.dsol.simulators.SimulatorInterfacejava.rmi.RemoteExceptionSimulatorInterface.getSimulatorTime()
public nl.tudelft.simulation.dsol.experiment.Replication getReplication()
throws java.rmi.RemoteException
getReplication in interface nl.tudelft.simulation.dsol.simulators.SimulatorInterfacejava.rmi.RemoteExceptionSimulatorInterface.getReplication()
public void initialize(nl.tudelft.simulation.dsol.experiment.Replication replication)
throws java.rmi.RemoteException,
nl.tudelft.simulation.dsol.SimRuntimeException
initialize in interface nl.tudelft.simulation.dsol.simulators.SimulatorInterfacejava.rmi.RemoteException
nl.tudelft.simulation.dsol.SimRuntimeExceptionSimulatorInterface.initialize(nl.tudelft.simulation.dsol.experiment.Replication)
public boolean isRunning()
throws java.rmi.RemoteException
isRunning in interface nl.tudelft.simulation.dsol.simulators.SimulatorInterfacejava.rmi.RemoteExceptionSimulatorInterface.isRunning()
public void start()
throws java.rmi.RemoteException,
nl.tudelft.simulation.dsol.SimRuntimeException
start in interface nl.tudelft.simulation.dsol.simulators.SimulatorInterfacejava.rmi.RemoteException
nl.tudelft.simulation.dsol.SimRuntimeExceptionSimulatorInterface.start()
public void step()
throws java.rmi.RemoteException,
nl.tudelft.simulation.dsol.SimRuntimeException
step in interface nl.tudelft.simulation.dsol.simulators.SimulatorInterfacejava.rmi.RemoteException
nl.tudelft.simulation.dsol.SimRuntimeExceptionSimulatorInterface.step()
public void stop()
throws java.rmi.RemoteException,
nl.tudelft.simulation.dsol.SimRuntimeException
stop in interface nl.tudelft.simulation.dsol.simulators.SimulatorInterfacejava.rmi.RemoteException
nl.tudelft.simulation.dsol.SimRuntimeExceptionSimulatorInterface.stop()
public boolean removeListener(nl.tudelft.simulation.event.EventListenerInterface listener,
nl.tudelft.simulation.event.EventType eventType)
removeListener in interface nl.tudelft.simulation.event.EventProducerInterfaceEventProducerInterface.removeListener(nl.tudelft.simulation.event.EventListenerInterface,
nl.tudelft.simulation.event.EventType)public java.lang.String getId()
public double getTimeStep()
throws java.rmi.RemoteException
getTimeStep in interface nl.tudelft.simulation.dsol.simulators.DESSSimulatorInterfacejava.rmi.RemoteExceptionDESSSimulatorInterface.getTimeStep()
public void setTimeStep(double arg0)
throws java.rmi.RemoteException
setTimeStep in interface nl.tudelft.simulation.dsol.simulators.DESSSimulatorInterfacejava.rmi.RemoteExceptionDESSSimulatorInterface.setTimeStep(double)
public long getAnimationDelay()
throws java.rmi.RemoteException
getAnimationDelay in interface RemoteInteractionLayerInterfacejava.rmi.RemoteException - thrown in case of network failureRemoteInteractionLayerInterface.getAnimationDelay()
public void setAnimationDelay(long arg0)
throws java.rmi.RemoteException
setAnimationDelay in interface RemoteInteractionLayerInterfacearg0 - the animation delay
java.rmi.RemoteException - thrown in case of network failureRemoteInteractionLayerInterface.setAnimationDelay(long)
public java.util.Map getActorKeys()
throws java.rmi.RemoteException
getActorKeys in interface RemoteInteractionLayerInterfacejava.rmi.RemoteException - thrown in case of network failureRemoteInteractionLayerInterface.getActorKeys()
public int getTotalNumberOfDays()
throws java.rmi.RemoteException
getTotalNumberOfDays in interface GlobalInteractionLayerInterfacejava.rmi.RemoteException - thrown in case of network failureGlobalInteractionLayerInterface.getTotalNumberOfDays()public void objectAdded(javax.naming.event.NamingEvent namingEvent)
objectAdded in interface javax.naming.event.NamespaceChangeListenerNamespaceChangeListener.objectAdded(javax.naming.event.NamingEvent)public void objectRemoved(javax.naming.event.NamingEvent namingEvent)
objectRemoved in interface javax.naming.event.NamespaceChangeListenerNamespaceChangeListener.objectRemoved(javax.naming.event.NamingEvent)public void objectRenamed(javax.naming.event.NamingEvent evt)
objectRenamed in interface javax.naming.event.NamespaceChangeListenerNamespaceChangeListener.objectRenamed(javax.naming.event.NamingEvent)public void namingExceptionThrown(javax.naming.event.NamingExceptionEvent evt)
namingExceptionThrown in interface javax.naming.event.NamingListenerNamingListener.namingExceptionThrown(javax.naming.event.NamingExceptionEvent)
public java.util.Map getBindings()
throws java.rmi.RemoteException
getBindings in interface RemoteInteractionLayerInterfacejava.rmi.RemoteException - thrown in case of network failureRemoteInteractionLayerInterface.getBindings()
public IntrospectionData getIntrospectedObjectData(java.lang.String key)
throws java.rmi.RemoteException
RemoteInteractionLayerInterface
getIntrospectedObjectData in interface RemoteInteractionLayerInterfacekey - the key to use
java.rmi.RemoteException - thrown in case of a network failureRemoteInteractionLayerInterface.getIntrospectedObjectData(java.lang.String)
public void updateIntrospectedObject(IntrospectionData data)
throws java.rmi.RemoteException
RemoteInteractionLayerInterface
updateIntrospectedObject in interface RemoteInteractionLayerInterfacedata - the data for the oject
java.rmi.RemoteException - thrown in case of a network failureRemoteInteractionLayerInterface.updateIntrospectedObject(org.gscg.gameleader.animation2D.mouse.IntrospectionData)
public void setAnimationRefreshDelay(double times,
nl.tudelft.simulation.event.remote.RemoteEventListenerInterface listener)
throws java.rmi.RemoteException
RemoteInteractionLayerInterface
setAnimationRefreshDelay in interface RemoteInteractionLayerInterfacetimes - the number of times per second the animation should be
refreshed (only if an update is present)listener - the listener for the event
java.rmi.RemoteException - thrown in case of a network errororg.gscg.gameleader.interactionlayer.RemoteInteractionLayerInterface#setAnimationRefreshDelay(int,
nl.tudelft.simulation.event.remote.RemoteEventListenerInterface)
public void removeAnimationRefreshDelayListener(nl.tudelft.simulation.event.remote.RemoteEventListenerInterface listener)
throws java.rmi.RemoteException
RemoteInteractionLayerInterface
removeAnimationRefreshDelayListener in interface RemoteInteractionLayerInterfacelistener - the listener to remove
java.rmi.RemoteException - thrown in case of network failureRemoteInteractionLayerInterface.removeAnimationRefreshDelayListener(nl.tudelft.simulation.event.remote.RemoteEventListenerInterface)
public void saveSimulation()
throws java.rmi.RemoteException
RemoteInteractionLayerInterface
saveSimulation in interface RemoteInteractionLayerInterfacejava.rmi.RemoteException - thrown in case of network failureRemoteInteractionLayerInterface.saveSimulation()public nl.tudelft.simulation.event.EventType[] getStatisticEventTypes()
getStatisticEventTypes in interface GlobalInteractionLayerInterfaceGlobalInteractionLayerInterface.getStatisticEventTypes()public void addEventTypeSentByClient(nl.tudelft.simulation.event.EventType eventType)
GlobalInteractionLayerInterface
addEventTypeSentByClient in interface GlobalInteractionLayerInterfaceeventType - the event type to addGlobalInteractionLayerInterface.addEventTypeSentByClient(nl.tudelft.simulation.event.EventType)
public void addEventTypeToAnnounceList(nl.tudelft.simulation.event.EventType eventType,
AnnounceInterface announceObject)
GlobalInteractionLayerInterface
addEventTypeToAnnounceList in interface GlobalInteractionLayerInterfaceeventType - the event typeannounceObject - the object to announceGlobalInteractionLayerInterface.addEventTypeToAnnounceList(nl.tudelft.simulation.event.EventType,
org.gscg.common.interactionlayer.AnnounceInterface)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||