cz.cuni.amis.pogamut.multi.communication.worldview.impl
Class AbstractSharedWorldView

java.lang.Object
  extended by cz.cuni.amis.pogamut.multi.communication.worldview.impl.AbstractSharedWorldView
All Implemented Interfaces:
IComponent, ISharedComponent, ISharedWorldChangeEventInput, ISharedWorldView
Direct Known Subclasses:
EventDrivenSharedWorldView

public abstract class AbstractSharedWorldView
extends java.lang.Object
implements ISharedWorldView


Field Summary
static Token COMPONENT_ID
           
protected  ISharedComponentControlHelper control
           
protected  ISharedComponentController<ISharedWorldView> controller
           
protected  HashTriMap<ITeamId,WorldObjectId,PropertyId,ISharedProperty> currentSharedProperties
          SharedProperties currently considered most-recent.
protected  java.util.HashMap<WorldObjectId,java.lang.Class> idClassMap
           
protected  java.util.HashMap<IAgentId,ILocalWorldView> localWorldViews
          LocalWorldViews registered with this sharedWorldView
protected  java.util.logging.Logger log
           
protected  WeakHashQuadMap<TimeKey,ITeamId,WorldObjectId,PropertyId,ISharedProperty> sharedProperties
          Holds all sharedProperties in the world weakly-referenced by timeKey, this map is used for storing shadowCopies of properties.
protected  WeakHashTriMap<TimeKey,ITeamId,WorldObjectId,ISharedWorldObject> sharedWorldObjects
          Cached sharedWorldObjects.
protected  java.util.Map<WorldObjectId,IStaticWorldObject> staticWorldObjects
          Map of staticWorldObjects, these objects never change, so there is no need for shadow copies.
protected  java.util.Map<ITeamId,java.util.Map<WorldObjectId,java.util.Map<PropertyId,ISharedProperty>>> syncCurrentSharedProperties
          Synchronized version of currentSharedProperties.
protected  java.util.Map<WorldObjectId,java.lang.Class> syncIdClassMap
           
protected  java.util.Map<TimeKey,java.util.Map<ITeamId,java.util.Map<WorldObjectId,java.util.Map<PropertyId,ISharedProperty>>>> syncSharedProperties
          Synchronized version of sharedProperties.
protected  java.util.Map<TimeKey,java.util.Map<ITeamId,java.util.Map<WorldObjectId,ISharedWorldObject>>> syncSharedWorldObjects
          Synchronized version of cached sharedWorldObjects.
 
Constructor Summary
AbstractSharedWorldView(java.util.logging.Logger logger)
           
 
Method Summary
 void addComponentBus(IAgentId agentId, ILifecycleBus bus, ComponentDependencies dependencies)
          Informs the component that it is part of another ILifecycleBus, i.e., it has become used by new agent with 'agentId'.
 void addEventListener(java.lang.Class<?> event, IWorldEventListener<?> listener)
          Adds listener to a specific event (Level A listeners).
 void addObjectListener(java.lang.Class<?> objectClass, java.lang.Class<?> eventClass, IWorldObjectEventListener<?,?> listener)
          Adds listener to a specified 'event' that occurs on the specific 'objectClass' (Level C listeners).
 void addObjectListener(java.lang.Class<?> objectClass, IWorldObjectEventListener<?,?> listener)
          Adds listener to all events that happens on any object of the 'objectClass' (Level B listeners).
 void addObjectListener(WorldObjectId objectId, java.lang.Class<?> eventClass, IWorldObjectEventListener<?,?> listener)
          Adds listener to a specified 'event' that occurs on the specific object with 'objectId' (Level E listeners).
 void addObjectListener(WorldObjectId objectId, IWorldObjectEventListener<?,?> listener)
          Adds listener to all events that happens on object with specific 'objectId' (Level D listeners).
protected  void addOldSharedProperty(ISharedProperty property, ITeamId teamId, long eventTime)
          Adds the provided sharedProperty for all currently held timeKeys.
protected  void addSharedProperty(ISharedProperty property)
          adds this shared property for all teams
protected  void addSharedProperty(ISharedProperty property, ITeamId teamId)
          adds this shared property only for the specified team
protected  void addSharedWorldObject(ISharedWorldObject object)
          adds all shared properties from this object for all teams
protected  void addStaticWorldObject(IStaticWorldObject object)
          if the object already exists, no changes are made
protected  void cleanUp()
          Cleans up internal data structures, called from start/stop/kill/reset methods.
protected abstract  ISharedWorldObject createSharedObject(java.lang.Class msgClass, WorldObjectId id, ITeamId teamId, TimeKey time)
          Creates a sharedWorldObject of the specified id.
 Token getComponentId()
          Unique identification of the component.
 ISharedWorldObject getShared(ITeamId teamId, WorldObjectId objectId, TimeKey time)
          Returns the shared part of a requested object.
protected  java.util.Collection<ISharedProperty> getSharedProperties(WorldObjectId objectId, ITeamId teamId, TimeKey time)
          Returns all shared properties belonging to the specified object.
protected  ISharedProperty getSharedProperty(PropertyId id, ITeamId teamId, TimeKey time)
          Returns exactly the requested property
 IStaticWorldObject getStatic(WorldObjectId id)
          Returns only the static part of a requested object, static part of each objects only contains properties, that will NOT be changed over time.
 boolean isListening(java.lang.Class<?> objectClass, java.lang.Class<?> eventClass, IWorldObjectEventListener<?,?> listener)
          Tests whether the 'listener' is listening at specified 'objectClass' for specified 'event' (Level C listeners).
 boolean isListening(java.lang.Class<?> eventClass, IWorldEventListener<?> listener)
          Tests whether the 'listener' is listening to a specific event (Level A listeners).
 boolean isListening(java.lang.Class<?> objectClass, IWorldObjectEventListener<?,?> listener)
          Tests whether the 'listener' is listening at specified 'objectClass' (Level B listeners).
 boolean isListening(IWorldEventListener<?> listener)
          Checks whether this listener is hooked to the world view (at any listener level).
 boolean isListening(WorldObjectId objectId, java.lang.Class<?> eventClass, IWorldObjectEventListener<?,?> listener)
          Tests whether the 'listener' is listening to a specified 'event' that occurs on the specific object with 'objectId' (Level E listeners).
 boolean isListening(WorldObjectId objectId, IWorldObjectEventListener<?,?> listener)
          Tests whether the 'listener' is listening at specified 'objectId' (Level D Listeners).
protected  boolean isPaused()
           
protected  boolean isRunning()
           
protected  void kill()
          Kills the world view.
protected  void pause()
          Pauses the world view.
protected  void prePause()
          Pre-pauses the world view.
protected  void preStop()
          Pre-stops the world view.
protected  void raiseEvent(IWorldEvent event)
          Process new IWorldEvent - notify all the listeners about it.
 void registerLocalWorldView(ILocalWorldView localWV, ILifecycleBus bus)
          This method is called when a new localWorldView is created and wants to use this sharedWorldView, the method registers the LocalWorldView with the sharedWorldView's sharedComponentBus and also internally stores the information about which WorldViews are registered to it.
 void removeComponentBus(IAgentId agentId, ILifecycleBus bus)
          Informs the component that it ceased to be the part of the ILifecycleBus, i.e., it has stopped to be used by agent with 'agentId'.
 void removeEventListener(java.lang.Class<?> eventClass, IWorldEventListener<?> listener)
          Removes listener from a specific event (Level A listeners).
 void removeListener(IWorldEventListener<?> listener)
          Removes listener from every listeners category (from every listener level).
 void removeObjectListener(java.lang.Class<?> objectClass, java.lang.Class<?> eventClass, IWorldObjectEventListener<?,?> listener)
          Removes listener from specific 'objectClass' listening for specified 'event' (Level C listeners).
 void removeObjectListener(java.lang.Class<?> objectClass, IWorldObjectEventListener<?,?> listener)
          Removes listener from specific 'objectClass' listening for specified 'event' (Level B listeners).
 void removeObjectListener(WorldObjectId objectId, java.lang.Class<?> eventClass, IWorldObjectEventListener<?,?> listener)
          Removes listener to a specified 'event' that occurs on the specific object with 'objectId' (Level E listeners).
 void removeObjectListener(WorldObjectId objectId, IWorldObjectEventListener<?,?> listener)
          Removes listener from objects with specified 'objectId' (Level D Listeners).
protected  void removeSharedProperty(ISharedProperty property)
           
protected  void removeSharedProperty(ISharedProperty property, ITeamId teamId)
           
protected  void removeStaticWorldObject(IStaticWorldObject object)
           
protected  void removeStaticWorldObject(WorldObjectId id)
           
protected  void reset()
          Resets the world view so it is start()able again.
protected  void resume()
          Resumes the world view.
protected  void start()
          Starts the world view.
protected  void stop()
          Stops the world view.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface cz.cuni.amis.pogamut.multi.communication.worldview.ISharedWorldChangeEventInput
notify
 

Field Detail

COMPONENT_ID

public static final Token COMPONENT_ID

localWorldViews

protected java.util.HashMap<IAgentId,ILocalWorldView> localWorldViews
LocalWorldViews registered with this sharedWorldView


sharedProperties

protected WeakHashQuadMap<TimeKey,ITeamId,WorldObjectId,PropertyId,ISharedProperty> sharedProperties
Holds all sharedProperties in the world weakly-referenced by timeKey, this map is used for storing shadowCopies of properties.


syncSharedProperties

protected java.util.Map<TimeKey,java.util.Map<ITeamId,java.util.Map<WorldObjectId,java.util.Map<PropertyId,ISharedProperty>>>> syncSharedProperties
Synchronized version of sharedProperties. If you iterate over this map, you must still synchronize manually however!


currentSharedProperties

protected HashTriMap<ITeamId,WorldObjectId,PropertyId,ISharedProperty> currentSharedProperties
SharedProperties currently considered most-recent.


syncCurrentSharedProperties

protected java.util.Map<ITeamId,java.util.Map<WorldObjectId,java.util.Map<PropertyId,ISharedProperty>>> syncCurrentSharedProperties
Synchronized version of currentSharedProperties. If you iterate over this map, you must still synchronize manually however!


staticWorldObjects

protected java.util.Map<WorldObjectId,IStaticWorldObject> staticWorldObjects
Map of staticWorldObjects, these objects never change, so there is no need for shadow copies.


sharedWorldObjects

protected WeakHashTriMap<TimeKey,ITeamId,WorldObjectId,ISharedWorldObject> sharedWorldObjects
Cached sharedWorldObjects.


syncSharedWorldObjects

protected java.util.Map<TimeKey,java.util.Map<ITeamId,java.util.Map<WorldObjectId,ISharedWorldObject>>> syncSharedWorldObjects
Synchronized version of cached sharedWorldObjects.


idClassMap

protected java.util.HashMap<WorldObjectId,java.lang.Class> idClassMap

syncIdClassMap

protected java.util.Map<WorldObjectId,java.lang.Class> syncIdClassMap

log

protected java.util.logging.Logger log

controller

protected ISharedComponentController<ISharedWorldView> controller

control

protected ISharedComponentControlHelper control
Constructor Detail

AbstractSharedWorldView

public AbstractSharedWorldView(java.util.logging.Logger logger)
Method Detail

registerLocalWorldView

public void registerLocalWorldView(ILocalWorldView localWV,
                                   ILifecycleBus bus)
This method is called when a new localWorldView is created and wants to use this sharedWorldView, the method registers the LocalWorldView with the sharedWorldView's sharedComponentBus and also internally stores the information about which WorldViews are registered to it.

Specified by:
registerLocalWorldView in interface ISharedWorldView
Parameters:
localWV - The local WorldView to to register.
bus - ILifecycleBus of the corresponding LocalWorldView

getSharedProperty

protected ISharedProperty getSharedProperty(PropertyId id,
                                            ITeamId teamId,
                                            TimeKey time)
Returns exactly the requested property


getSharedProperties

protected java.util.Collection<ISharedProperty> getSharedProperties(WorldObjectId objectId,
                                                                    ITeamId teamId,
                                                                    TimeKey time)
Returns all shared properties belonging to the specified object.

Parameters:
objectId -
teamId -
time -
Returns:

createSharedObject

protected abstract ISharedWorldObject createSharedObject(java.lang.Class msgClass,
                                                         WorldObjectId id,
                                                         ITeamId teamId,
                                                         TimeKey time)
Creates a sharedWorldObject of the specified id. This method constructs the objects from sharedProperties so it must be overriden by a WorldView that is aware of sharedObjectTypes and can construct the correct objects.

Parameters:
id -
teamId -
time -
Returns:

getShared

public ISharedWorldObject getShared(ITeamId teamId,
                                    WorldObjectId objectId,
                                    TimeKey time)
Description copied from interface: ISharedWorldView
Returns the shared part of a requested object. Shared part of every worldObject contains properties, that are relevant to multiple agents (usually a team) and are not subjective in nature (every agent sees them differently). Good example is a boolean property isSpawned . Also note, that many shared properties are computed from other knowledge about the object (isVisible => isSpawned). For this reason, the value of a shared property can get "dirty" over time, so don't forget to check if your property is up-to-date.

Specified by:
getShared in interface ISharedWorldView
Returns:

getStatic

public IStaticWorldObject getStatic(WorldObjectId id)
Description copied from interface: ISharedWorldView
Returns only the static part of a requested object, static part of each objects only contains properties, that will NOT be changed over time. Therefore the static part of each object is immutable and always up-to-date.

Specified by:
getStatic in interface ISharedWorldView
Parameters:
id - - WorldObjectId of the entire WorldObject

addStaticWorldObject

protected void addStaticWorldObject(IStaticWorldObject object)
if the object already exists, no changes are made


removeStaticWorldObject

protected void removeStaticWorldObject(WorldObjectId id)

removeStaticWorldObject

protected void removeStaticWorldObject(IStaticWorldObject object)

addSharedProperty

protected void addSharedProperty(ISharedProperty property,
                                 ITeamId teamId)
adds this shared property only for the specified team

Parameters:
property -
teamId -

addSharedProperty

protected void addSharedProperty(ISharedProperty property)
adds this shared property for all teams

Parameters:
property -

removeSharedProperty

protected void removeSharedProperty(ISharedProperty property,
                                    ITeamId teamId)

removeSharedProperty

protected void removeSharedProperty(ISharedProperty property)

addSharedWorldObject

protected void addSharedWorldObject(ISharedWorldObject object)
adds all shared properties from this object for all teams

Parameters:
object -

addOldSharedProperty

protected void addOldSharedProperty(ISharedProperty property,
                                    ITeamId teamId,
                                    long eventTime)
Adds the provided sharedProperty for all currently held timeKeys. Any old properties inserted before will NOT be overriden, this method only adds new shadowCopies.

Parameters:
property -
teamId -
eventTime - time of the event causing the property update

addComponentBus

public void addComponentBus(IAgentId agentId,
                            ILifecycleBus bus,
                            ComponentDependencies dependencies)
Description copied from interface: ISharedComponent
Informs the component that it is part of another ILifecycleBus, i.e., it has become used by new agent with 'agentId'.

The component is obliged to register to that bus a watch for the lifecycle state of various components inside the bus.

Specified by:
addComponentBus in interface ISharedComponent

removeComponentBus

public void removeComponentBus(IAgentId agentId,
                               ILifecycleBus bus)
Description copied from interface: ISharedComponent
Informs the component that it ceased to be the part of the ILifecycleBus, i.e., it has stopped to be used by agent with 'agentId'.

Specified by:
removeComponentBus in interface ISharedComponent

cleanUp

protected void cleanUp()
Cleans up internal data structures, called from start/stop/kill/reset methods.

If you override this method, do not forget to call super.cleanUp().


start

protected void start()
Starts the world view.

If you override this method, do not forget to call super.start().


prePause

protected void prePause()
Pre-pauses the world view.

If you override this method, do not forget to call super.preStop().


pause

protected void pause()
Pauses the world view.

If you override this method, do not forget to call super.start().


resume

protected void resume()
Resumes the world view.

If you override this method, do not forget to call super.start().


preStop

protected void preStop()
Pre-stops the world view.

If you override this method, do not forget to call super.preStop().


stop

protected void stop()
Stops the world view.

If you override this method, do not forget to call super.stop().


kill

protected void kill()
Kills the world view.

If you override this method, do not forget to call super.stop().


reset

protected void reset()
Resets the world view so it is start()able again.

If you override this method, do not forget to call super.reset().


isRunning

protected boolean isRunning()

isPaused

protected boolean isPaused()

getComponentId

public Token getComponentId()
Description copied from interface: IComponent
Unique identification of the component.

Specified by:
getComponentId in interface IComponent
Returns:

addEventListener

public void addEventListener(java.lang.Class<?> event,
                             IWorldEventListener<?> listener)
Description copied from interface: ISharedWorldView
Adds listener to a specific event (Level A listeners). Note that the event listener must be able to handle events of the class 'event'.

It is the most general type of listener-registration allowing you to sniff any type of events.

Events passed to the listener are filtered only according to the 'event' class.

WARNING: even though the method does not require templated class and listener, you must be sure that 'listener' can accept 'eventClass'.

Specified by:
addEventListener in interface ISharedWorldView
Parameters:
event - which event types you want to receive
listener - where you want to handle these events

addObjectListener

public void addObjectListener(java.lang.Class<?> objectClass,
                              IWorldObjectEventListener<?,?> listener)
Description copied from interface: ISharedWorldView
Adds listener to all events that happens on any object of the 'objectClass' (Level B listeners).

Events passed to the listener are filtered according to the 'objectClass'.

WARNING: even though the method does not require templated classes and listener, you must be sure that 'listener' accepts all events (IWorldObjectEvent) for objects of 'objectClass'.

Specified by:
addObjectListener in interface ISharedWorldView
Parameters:
objectClass - which object class you want to listen at
listener - where you want to handle these events

addObjectListener

public void addObjectListener(java.lang.Class<?> objectClass,
                              java.lang.Class<?> eventClass,
                              IWorldObjectEventListener<?,?> listener)
Description copied from interface: ISharedWorldView
Adds listener to a specified 'event' that occurs on the specific 'objectClass' (Level C listeners).

Events passed to the listener are filtered according to the 'event' and 'objectClass' of the object the event happened upon.

WARNING: even though the method does not require templated classes and listener, you must be sure that 'listener' accepts 'eventClass' for objects of 'objectClass'.

eventClass can be any implementor of IWorldObjectEvent. E.g. WorldObjectAppearedEvent, WorldObjectDestroyedEvent, WorldObjectDisappearedEvent, WorldObjectFirstEncounteredEvent or WorldObjectUpdatedEvent.

Specified by:
addObjectListener in interface ISharedWorldView
Parameters:
objectClass - which object class you want to listen at
eventClass - which event class you want to receive
listener - where you want to handle these events

addObjectListener

public void addObjectListener(WorldObjectId objectId,
                              IWorldObjectEventListener<?,?> listener)
Description copied from interface: ISharedWorldView
Adds listener to all events that happens on object with specific 'objectId' (Level D listeners).

Events passed to the listener are filtered according to the 'objectId' of the object.

WARNING: you must ensure that 'listener' can accept the event raised on object of specified 'objectId'.

Specified by:
addObjectListener in interface ISharedWorldView
Parameters:
objectId - which object you want to listen at
listener - where you want to handle events

addObjectListener

public void addObjectListener(WorldObjectId objectId,
                              java.lang.Class<?> eventClass,
                              IWorldObjectEventListener<?,?> listener)
Description copied from interface: ISharedWorldView
Adds listener to a specified 'event' that occurs on the specific object with 'objectId' (Level E listeners).

Events passed to the listener are filtered according to the 'event' and 'objectId' of the object.

WARNING: even though the method does not require templated classes and listener, you must be sure that 'listener' accepts 'eventClass' for objects of specified 'objectId'.

Specified by:
addObjectListener in interface ISharedWorldView
Parameters:
objectId - which object you want to listen at
eventClass - which event classes you want to receive
listener - where you want to handle these events

isListening

public boolean isListening(java.lang.Class<?> eventClass,
                           IWorldEventListener<?> listener)
Description copied from interface: ISharedWorldView
Tests whether the 'listener' is listening to a specific event (Level A listeners).

Specified by:
isListening in interface ISharedWorldView
Parameters:
eventClass - which events you want to receive
listener - that is tested
Returns:
whether the listener is listening

isListening

public boolean isListening(java.lang.Class<?> objectClass,
                           IWorldObjectEventListener<?,?> listener)
Description copied from interface: ISharedWorldView
Tests whether the 'listener' is listening at specified 'objectClass' (Level B listeners).

Specified by:
isListening in interface ISharedWorldView
Parameters:
objectClass - where the listener is tested
listener - that is tested
Returns:
whether the listener is listening

isListening

public boolean isListening(java.lang.Class<?> objectClass,
                           java.lang.Class<?> eventClass,
                           IWorldObjectEventListener<?,?> listener)
Description copied from interface: ISharedWorldView
Tests whether the 'listener' is listening at specified 'objectClass' for specified 'event' (Level C listeners).

Specified by:
isListening in interface ISharedWorldView
Parameters:
objectClass - where the listener is tested
eventClass - where the listener is tested
listener - that is tested
Returns:
whether the listener is listening

isListening

public boolean isListening(WorldObjectId objectId,
                           IWorldObjectEventListener<?,?> listener)
Description copied from interface: ISharedWorldView
Tests whether the 'listener' is listening at specified 'objectId' (Level D Listeners).

Specified by:
isListening in interface ISharedWorldView
Parameters:
objectId - where the listener is tested
listener - that is tested
Returns:
whether the listener is listening

isListening

public boolean isListening(WorldObjectId objectId,
                           java.lang.Class<?> eventClass,
                           IWorldObjectEventListener<?,?> listener)
Description copied from interface: ISharedWorldView
Tests whether the 'listener' is listening to a specified 'event' that occurs on the specific object with 'objectId' (Level E listeners).

Specified by:
isListening in interface ISharedWorldView
Parameters:
objectId - where the listener is tested
eventClass - what class is tested
listener - that is tested
Returns:
whether the listener is listening

isListening

public boolean isListening(IWorldEventListener<?> listener)
Description copied from interface: ISharedWorldView
Checks whether this listener is hooked to the world view (at any listener level).

WARNING: Can be time consuming! (Iterating through all levels of listeners.)

Specified by:
isListening in interface ISharedWorldView
Returns:

removeEventListener

public void removeEventListener(java.lang.Class<?> eventClass,
                                IWorldEventListener<?> listener)
Description copied from interface: ISharedWorldView
Removes listener from a specific event (Level A listeners).

Specified by:
removeEventListener in interface ISharedWorldView
Parameters:
eventClass - which events class you want to remove the listener from
listener - you want to remove

removeObjectListener

public void removeObjectListener(java.lang.Class<?> objectClass,
                                 IWorldObjectEventListener<?,?> listener)
Description copied from interface: ISharedWorldView
Removes listener from specific 'objectClass' listening for specified 'event' (Level B listeners).

Specified by:
removeObjectListener in interface ISharedWorldView
Parameters:
objectClass - class of objects you want the listener to remove from
listener - you want to remove

removeObjectListener

public void removeObjectListener(java.lang.Class<?> objectClass,
                                 java.lang.Class<?> eventClass,
                                 IWorldObjectEventListener<?,?> listener)
Description copied from interface: ISharedWorldView
Removes listener from specific 'objectClass' listening for specified 'event' (Level C listeners).

Specified by:
removeObjectListener in interface ISharedWorldView
Parameters:
objectClass - class of objects you want the listener to remove from
eventClass - which events class you want to remove the listener from
listener - you want to remove

removeObjectListener

public void removeObjectListener(WorldObjectId objectId,
                                 IWorldObjectEventListener<?,?> listener)
Description copied from interface: ISharedWorldView
Removes listener from objects with specified 'objectId' (Level D Listeners).

Specified by:
removeObjectListener in interface ISharedWorldView
Parameters:
objectId - id of object you want the listener to remove from
listener - you want to remove

removeObjectListener

public void removeObjectListener(WorldObjectId objectId,
                                 java.lang.Class<?> eventClass,
                                 IWorldObjectEventListener<?,?> listener)
Description copied from interface: ISharedWorldView
Removes listener to a specified 'event' that occurs on the specific object with 'objectId' (Level E listeners).

Specified by:
removeObjectListener in interface ISharedWorldView
Parameters:
objectId - id of object you want the listener to remove from
eventClass - event class you want to stop receiving in the listener
listener - you want to remove

removeListener

public void removeListener(IWorldEventListener<?> listener)
Description copied from interface: ISharedWorldView
Removes listener from every listeners category (from every listener level).

WARNING: Can be time consuming! (Iterating through all levels of listeners.)

Specified by:
removeListener in interface ISharedWorldView
Parameters:
listener - you want to remove from all listener levels

raiseEvent

protected void raiseEvent(IWorldEvent event)
Process new IWorldEvent - notify all the listeners about it. Forbids recursion.

Use in the descendants to process new IWorldChangeEvent.

Does not catch any exceptions!

Synchronized!

Parameters:
event -