cz.cuni.amis.pogamut.base.agent.navigation
Interface IPathFuture<PATH_ELEMENT>

Type Parameters:
PATH_ELEMENT -
All Superinterfaces:
java.util.concurrent.Future<java.util.List<PATH_ELEMENT>>
All Known Implementing Classes:
PathFuture, PrecomputedPathFuture, UT2004AStarPathFuture

public interface IPathFuture<PATH_ELEMENT>
extends java.util.concurrent.Future<java.util.List<PATH_ELEMENT>>

Returns a path as the future result of IPathPlanner computation.

You should read the javadoc for Future first to know the concept first.


Method Summary
 void addFutureListener(IFutureListener<java.util.List<PATH_ELEMENT>> listener)
          Adds a listener on a future status (using strong reference).
 java.util.List<PATH_ELEMENT> get()
          First, see Future.get().
 java.util.List<PATH_ELEMENT> get(long timeout, java.util.concurrent.TimeUnit unit)
          Returns a path from getPathFrom() to getPathTo().
 PATH_ELEMENT getPathFrom()
          Where does the path start.
 PATH_ELEMENT getPathTo()
          Where does the path end.
 FutureStatus getStatus()
          Current status of the path computation.
 boolean isListening(IFutureListener<java.util.List<PATH_ELEMENT>> listener)
          Whether some listener is listening on the future.
 void removeFutureListener(IFutureListener<java.util.List<PATH_ELEMENT>> listener)
          Removes a listener from the future.
 
Methods inherited from interface java.util.concurrent.Future
cancel, isCancelled, isDone
 

Method Detail

get

java.util.List<PATH_ELEMENT> get()
First, see Future.get().

May return null if no such path exist.

Throws some runtime exception if the path could not be computed (exact type of exception depends on the implementor of the interface).

Specified by:
get in interface java.util.concurrent.Future<java.util.List<PATH_ELEMENT>>
Returns:
computed path

get

java.util.List<PATH_ELEMENT> get(long timeout,
                                 java.util.concurrent.TimeUnit unit)
Returns a path from getPathFrom() to getPathTo(). "From" is the first element of the path, "To" is the last element of the path.

First, see Future.get(long, TimeUnit).

May return null if no such path exist.

Throws some runtime exception if the path could not be computed (exact type of exception depends on the implementor of the interface).

Specified by:
get in interface java.util.concurrent.Future<java.util.List<PATH_ELEMENT>>

getPathFrom

PATH_ELEMENT getPathFrom()
Where does the path start. Note that this point might not be the first item of the path element list, this element marks the start location from which the planner has begun.

Returns:

getPathTo

PATH_ELEMENT getPathTo()
Where does the path end. Note that this point might not be the last item of the path element list, this element marks the end location to which the planner should plan the path.

Returns:

getStatus

FutureStatus getStatus()
Current status of the path computation.

Returns:

addFutureListener

void addFutureListener(IFutureListener<java.util.List<PATH_ELEMENT>> listener)
Adds a listener on a future status (using strong reference). Listeners are automatically removed whenever the future gets its result (or is cancelled or an exception happens).

Parameters:
listener -

removeFutureListener

void removeFutureListener(IFutureListener<java.util.List<PATH_ELEMENT>> listener)
Removes a listener from the future.

Parameters:
listener -

isListening

boolean isListening(IFutureListener<java.util.List<PATH_ELEMENT>> listener)
Whether some listener is listening on the future.

Parameters:
listener -
Returns: