|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.base.agent.navigation.impl.AbstractPathExecutor<PATH_ELEMENT> cz.cuni.amis.pogamut.base.agent.navigation.impl.BasePathExecutor<PATH_ELEMENT> cz.cuni.amis.pogamut.ut2004.agent.navigation.UT2004PathExecutor<PATH_ELEMENT>
public class UT2004PathExecutor<PATH_ELEMENT extends ILocated>
Field Summary |
---|
Fields inherited from class cz.cuni.amis.pogamut.base.agent.navigation.impl.BasePathExecutor |
---|
mutex, pathFuture, previousPathElementIndex |
Fields inherited from class cz.cuni.amis.pogamut.base.agent.navigation.impl.AbstractPathExecutor |
---|
log, state, stuckDetectors |
Constructor Summary | |
---|---|
UT2004PathExecutor(UT2004Bot bot)
|
|
UT2004PathExecutor(UT2004Bot bot,
IUT2004PathNavigator<PATH_ELEMENT> navigator)
|
|
UT2004PathExecutor(UT2004Bot bot,
IUT2004PathNavigator<PATH_ELEMENT> navigator,
java.util.logging.Logger log)
|
Method Summary | |
---|---|
protected void |
calculateTimeout()
|
protected void |
eventEndMessage()
|
protected void |
followPathImpl()
Method that is called just after the executor's state is switched to PathExecutorState.FOLLOW_PATH_CALLED from
within the BasePathExecutor.followPath(IPathFuture) method. |
ILocated |
getFocus()
Return current focus of the bot, null means "default" provided by the path executor. |
java.util.List<IStuckDetector> |
getStuckDetectors()
Returns list of all stuck detectors registered inside the executor. |
protected void |
navigate()
|
protected void |
pathComputationFailedImpl()
Method that is called just after the executor's state is switched to PathExecutorState.PATH_COMPUTATION_FAILED from
within the BasePathExecutor.pathComputationFailed() method. |
protected void |
pathComputedImpl()
If the path is not zero-length, recalls IUT2004PathNavigator.newPath(List)
and set the path into the GB2004 via SetRoute . |
protected void |
preStuckImpl()
Method that is called just before the executor's state is switched to PathExecutorState#STUCKD from within the
BasePathExecutor#stuck(IStuckDetector) method. |
protected void |
preTargetReachedImpl()
Method that is called just before the executor's state is switched to PathExecutorState.TARGET_REACHED from within the
BasePathExecutor.targetReached() method. |
void |
setFocus(ILocated located)
Allows you to set focus during the path-execution, i.e., tell the bot where it should be looking. |
UT2004PathExecutor<PATH_ELEMENT> |
setTimeoutEstimator(IPathExecutionEstimator<PATH_ELEMENT> timeoutEstimator)
|
protected void |
stopped()
Method that is called just after the executor's state is switched to PathExecutorState.STOPPED from
within the BasePathExecutor.stop() method. |
protected void |
stuckImpl()
Method that is called just after the executor's state is switched to PathExecutorState.STUCK from
within the BasePathExecutor#stuck(IStuckDetector) method. |
protected void |
switchToAnotherPathElementImpl()
Sets the path into the GB2004 via SetRoute whenever switch occurs and the rest of the path is greater than
32 path elements. |
protected void |
targetReachedImpl()
Method that is called just after the executor's state is switched to PathExecutorState.TARGET_REACHED from
within the BasePathExecutor.targetReached() method. |
Methods inherited from class cz.cuni.amis.pogamut.base.agent.navigation.impl.BasePathExecutor |
---|
checkStuckDetectors, createState, followPath, getPathElementIndex, getPathFuture, pathComputationFailed, pathComputed, preFollowPathImpl, prePathComputationFailed, prePathComputedImpl, preSwitchToAnotherPathElementImpl, stop, stopImpl, stuck, switchToAnotherPathElement, targetReached |
Methods inherited from class cz.cuni.amis.pogamut.base.agent.navigation.impl.AbstractPathExecutor |
---|
addStuckDetector, getLog, getPath, getPathElement, getState, inState, isExecuting, isPathUnavailable, isStuck, isTargetReached, notInState, removeStuckDetector, setLog, switchState |
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.base.agent.navigation.IPathExecutorHelper |
---|
checkStuckDetectors, stuck, switchToAnotherPathElement, targetReached |
Methods inherited from interface cz.cuni.amis.pogamut.base.agent.navigation.IPathExecutor |
---|
addStuckDetector, followPath, getLog, getPath, getPathElement, getPathElementIndex, getPathFuture, getState, inState, isExecuting, isPathUnavailable, isStuck, isTargetReached, notInState, removeStuckDetector, stop |
Constructor Detail |
---|
public UT2004PathExecutor(UT2004Bot bot)
public UT2004PathExecutor(UT2004Bot bot, IUT2004PathNavigator<PATH_ELEMENT> navigator)
public UT2004PathExecutor(UT2004Bot bot, IUT2004PathNavigator<PATH_ELEMENT> navigator, java.util.logging.Logger log)
Method Detail |
---|
public UT2004PathExecutor<PATH_ELEMENT> setTimeoutEstimator(IPathExecutionEstimator<PATH_ELEMENT> timeoutEstimator)
protected void stopped()
BasePathExecutor
PathExecutorState.STOPPED
from
within the BasePathExecutor.stop()
method.
You may utilize this method (for instance) to:
stopped
in class BasePathExecutor<PATH_ELEMENT extends ILocated>
protected void followPathImpl()
BasePathExecutor
PathExecutorState.FOLLOW_PATH_CALLED
from
within the BasePathExecutor.followPath(IPathFuture)
method.
You may utilize this method this way:
followPathImpl
in class BasePathExecutor<PATH_ELEMENT extends ILocated>
protected void pathComputedImpl()
IUT2004PathNavigator.newPath(List)
and set the path into the GB2004 via SetRoute
.
pathComputedImpl
in class BasePathExecutor<PATH_ELEMENT extends ILocated>
protected void pathComputationFailedImpl()
BasePathExecutor
PathExecutorState.PATH_COMPUTATION_FAILED
from
within the BasePathExecutor.pathComputationFailed()
method. Note that the path can be simply obtained
by calling AbstractPathExecutor.getPath()
.
You may utilize this method (for instance) to:
pathComputationFailedImpl
in class BasePathExecutor<PATH_ELEMENT extends ILocated>
protected void preStuckImpl()
BasePathExecutor
PathExecutorState#STUCKD
from within the
BasePathExecutor#stuck(IStuckDetector)
method. Note that this method is called to clean up internal data structures
before we switch itself into PathExecutorState.STUCK
state.
You may utilize this method (for instance) to:
BasePathExecutor.createState(PathExecutorState)
to create more-informed state object.WARNING: 'null' may be passed as 'detector' if the stuck has been detected by different component
preStuckImpl
in class BasePathExecutor<PATH_ELEMENT extends ILocated>
protected void switchToAnotherPathElementImpl()
SetRoute
whenever switch occurs and the rest of the path is greater than
32 path elements.
switchToAnotherPathElementImpl
in class BasePathExecutor<PATH_ELEMENT extends ILocated>
protected void calculateTimeout()
protected void preTargetReachedImpl()
BasePathExecutor
PathExecutorState.TARGET_REACHED
from within the
BasePathExecutor.targetReached()
method.
You may utilize this method (for instance) to:
BasePathExecutor.createState(PathExecutorState)
to create more-informed state object.Empty implementation, does not doing anything.
preTargetReachedImpl
in class BasePathExecutor<PATH_ELEMENT extends ILocated>
protected void eventEndMessage()
protected void navigate()
public ILocated getFocus()
IUnrealPathExecutor
getFocus
in interface IUnrealPathExecutor<PATH_ELEMENT extends ILocated>
public void setFocus(ILocated located)
IUnrealPathExecutor
Note that the focus once set is never overridden by the path executer. So if you want to reset it back to the default focus, set the focus to 'null'.
setFocus
in interface IUnrealPathExecutor<PATH_ELEMENT extends ILocated>
public java.util.List<IStuckDetector> getStuckDetectors()
IUT2004PathExecutorHelper
getStuckDetectors
in interface IUT2004PathExecutorHelper<PATH_ELEMENT extends ILocated>
protected void stuckImpl()
BasePathExecutor
PathExecutorState.STUCK
from
within the BasePathExecutor#stuck(IStuckDetector)
method.
You may utilize this method (for instance) to:
WARNING: 'null' may be passed as 'detector' if the stuck has been detected by different component
stuckImpl
in class BasePathExecutor<PATH_ELEMENT extends ILocated>
protected void targetReachedImpl()
BasePathExecutor
PathExecutorState.TARGET_REACHED
from
within the BasePathExecutor.targetReached()
method.
You may utilize this method (for instance) to:
targetReachedImpl
in class BasePathExecutor<PATH_ELEMENT extends ILocated>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |