org.gvsig.remoteclient.taskplanning.retrieving
Class RetrieveQueue

java.lang.Object
  extended by org.gvsig.remoteclient.taskplanning.retrieving.RetrieveQueue
All Implemented Interfaces:
IQueue

public class RetrieveQueue
extends java.lang.Object
implements IQueue

Author:
jaume dominguez faus - jaume.dominguez@iver.es Luis W. Sevilla (sevilla_lui@gva.es)

Constructor Summary
RetrieveQueue(java.lang.String hName)
           
 
Method Summary
 ITaskPlanner getTaskPlanner()
          Returns the task planner currently defined by this queue.
 java.util.Vector getTasks()
          Returns the set of tasks in a Vector (thread-safe).
protected  URLRetrieveTask getURLPreviousRequest(URLRequest request)
           
 boolean isEmpty()
          Returns true if the Queue has no (more) jobs to do.
 void pause()
          Causes the execution of this queue to be paused.
 IRunnableTask put(IRunnableTask task)
          Adds a new task to the queue.
 void resume()
          Causes the execution of this queue to be resumed.
 void setTaskPlanner(ITaskPlanner planner)
          Sets the TaskPlanner that will decide which of the tasks in the queue will be executed next.
 IRunnableTask take()
          Returns the next task by calling the task planner's nextTask() method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RetrieveQueue

public RetrieveQueue(java.lang.String hName)
Method Detail

getTaskPlanner

public ITaskPlanner getTaskPlanner()
Description copied from interface: IQueue
Returns the task planner currently defined by this queue.

Specified by:
getTaskPlanner in interface IQueue
Returns:
ITaskPlanner

getTasks

public java.util.Vector getTasks()
Description copied from interface: IQueue
Returns the set of tasks in a Vector (thread-safe).

Specified by:
getTasks in interface IQueue
Returns:
Vector containing the tasks in this queue.

getURLPreviousRequest

protected URLRetrieveTask getURLPreviousRequest(URLRequest request)

isEmpty

public boolean isEmpty()
Description copied from interface: IQueue
Returns true if the Queue has no (more) jobs to do.

Specified by:
isEmpty in interface IQueue
Returns:

pause

public void pause()
Description copied from interface: IQueue
Causes the execution of this queue to be paused. The task currently in execution finishes and after it the planner will not issue more tasks until resume() is invoked.

Specified by:
pause in interface IQueue

put

public IRunnableTask put(IRunnableTask task)
Description copied from interface: IQueue
Adds a new task to the queue. The place where the new task will be put its left to the concrete implementation of this interface.

Specified by:
put in interface IQueue

resume

public void resume()
Description copied from interface: IQueue
Causes the execution of this queue to be resumed. The execution will continue with the next task issued by the planner. It has no effect if the queue was not paused yet.

Specified by:
resume in interface IQueue

setTaskPlanner

public void setTaskPlanner(ITaskPlanner planner)
Description copied from interface: IQueue
Sets the TaskPlanner that will decide which of the tasks in the queue will be executed next. A null value should represent a FIFO planner.

Specified by:
setTaskPlanner in interface IQueue

take

public IRunnableTask take()
Description copied from interface: IQueue
Returns the next task by calling the task planner's nextTask() method.

Specified by:
take in interface IQueue
Returns:
IRunnableTask with the next task to be executed.


Copyright © 2014 gvSIG Association. All Rights Reserved.