|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectcz.cuni.amis.pogamut.base.communication.worldview.impl.AbstractWorldView
cz.cuni.amis.pogamut.base.communication.worldview.impl.EventDrivenWorldView
cz.cuni.amis.pogamut.base3d.worldview.impl.VisionWorldView
cz.cuni.amis.pogamut.base3d.worldview.impl.BatchAwareWorldView
cz.cuni.amis.pogamut.udk.communication.worldview.UDKWorldView
cz.cuni.amis.pogamut.udk.communication.worldview.UDKLockableWorldView
public class UDKLockableWorldView
Lockable word view.
Contains GameBotsUDK correct locking of the worldview.
All messages are processed always in batches (all messages between EndMessages are one batch) meaning that the world view is always correct!
When worldview is lock()ed it postpones the events until unlock()ed, which is triggering raising all events that came from the lock().
The world view is unlocked from the beginning.
All those locking mechanisms start working when the first BEGIN message comes.
| Field Summary | |
|---|---|
static String |
WORLDVIEW_DEPENDENCY
|
| Fields inherited from class cz.cuni.amis.pogamut.base3d.worldview.impl.BatchAwareWorldView |
|---|
currentObjectBatch, lastObjectBatch |
| Fields inherited from class cz.cuni.amis.pogamut.base.communication.worldview.impl.EventDrivenWorldView |
|---|
notifyEventsList, receiveEventProcessing |
| Fields inherited from class cz.cuni.amis.pogamut.base.communication.worldview.impl.AbstractWorldView |
|---|
COMPONENT_ID, control, controller, eventBus, log |
| Constructor Summary | |
|---|---|
UDKLockableWorldView(cz.cuni.amis.pogamut.base.component.controller.ComponentDependencies dependencies,
cz.cuni.amis.pogamut.base.communication.mediator.IMediator mediator,
cz.cuni.amis.pogamut.base.component.bus.IComponentBus bus,
cz.cuni.amis.pogamut.base.utils.logging.IAgentLogger log)
|
|
| Method Summary | |
|---|---|
boolean |
hasBatchesToProcess()
|
boolean |
isLocked()
|
void |
lock()
When the world view is locked - no batches are processes until unlocked. |
void |
notify(cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEvent event)
Implements locking logic. |
void |
unlock()
Unlocks the world view - triggers processing of all events till the last EndMessage that came between lock() / unlock() calls. |
| Methods inherited from class cz.cuni.amis.pogamut.udk.communication.worldview.UDKWorldView |
|---|
isBatchBeginEvent, isBatchEndEvent, setDisappearedFlag |
| Methods inherited from class cz.cuni.amis.pogamut.base3d.worldview.impl.BatchAwareWorldView |
|---|
batchAwareWorldViewNotify, hasObjectsToProcess, notifyImmediately, objectAppeared, objectDisappeared |
| Methods inherited from class cz.cuni.amis.pogamut.base3d.worldview.impl.VisionWorldView |
|---|
addVisibleObject, cleanUp, getAllVisible, getAllVisible, getVisible, getVisible, objectCreated, objectDestroyed, objectUpdatedEvent, removeVisibleObject |
| Methods inherited from class cz.cuni.amis.pogamut.base.communication.worldview.impl.EventDrivenWorldView |
|---|
innerNotify, notifyAfterPropagation, objectUpdated, raiseEvent |
| Methods inherited from class cz.cuni.amis.pogamut.base.communication.worldview.impl.AbstractWorldView |
|---|
addEventListener, addObjectListener, addObjectListener, addObjectListener, addObjectListener, addWorldObject, get, get, get, getAll, getAll, getComponentId, getEventBus, getLog, getSingle, isListening, isListening, isListening, isListening, isListening, isListening, isPaused, isRunning, kill, pause, prePause, preStop, removeEventListener, removeListener, removeObjectListener, removeObjectListener, removeObjectListener, removeObjectListener, removeWorldObject, reset, resume, start, stop, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface cz.cuni.amis.pogamut.base3d.worldview.IVisionWorldView |
|---|
getAllVisible, getAllVisible, getVisible, getVisible |
| Methods inherited from interface cz.cuni.amis.pogamut.base.communication.worldview.IWorldView |
|---|
addEventListener, addObjectListener, addObjectListener, addObjectListener, addObjectListener, get, get, get, getAll, getAll, getEventBus, getSingle, isListening, isListening, isListening, isListening, isListening, isListening, removeEventListener, removeListener, removeObjectListener, removeObjectListener, removeObjectListener, removeObjectListener |
| Methods inherited from interface cz.cuni.amis.pogamut.base.communication.worldview.IWorldChangeEventInput |
|---|
notifyAfterPropagation, notifyImmediately |
| Methods inherited from interface cz.cuni.amis.pogamut.base.component.IComponent |
|---|
getComponentId |
| Field Detail |
|---|
public static final String WORLDVIEW_DEPENDENCY
| Constructor Detail |
|---|
@Inject
public UDKLockableWorldView(cz.cuni.amis.pogamut.base.component.controller.ComponentDependencies dependencies,
cz.cuni.amis.pogamut.base.communication.mediator.IMediator mediator,
cz.cuni.amis.pogamut.base.component.bus.IComponentBus bus,
cz.cuni.amis.pogamut.base.utils.logging.IAgentLogger log)
| Method Detail |
|---|
public void lock()
throws cz.cuni.amis.pogamut.base.component.bus.exception.ComponentNotRunningException
lock in interface cz.cuni.amis.pogamut.base.communication.worldview.ILockableWorldViewcz.cuni.amis.pogamut.base.component.bus.exception.ComponentNotRunningException
public void unlock()
throws cz.cuni.amis.pogamut.base.component.bus.exception.ComponentNotRunningException
unlock in interface cz.cuni.amis.pogamut.base.communication.worldview.ILockableWorldViewcz.cuni.amis.pogamut.base.component.bus.exception.ComponentNotRunningExceptionpublic boolean isLocked()
isLocked in interface cz.cuni.amis.pogamut.base.communication.worldview.ILockableWorldViewpublic boolean hasBatchesToProcess()
public void notify(cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEvent event)
notify in interface cz.cuni.amis.pogamut.base.communication.worldview.IWorldChangeEventInputnotify in class cz.cuni.amis.pogamut.base3d.worldview.impl.BatchAwareWorldView
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||