com.almende.eve.scheduler
Class RunnableSchedulerFactory.RunnableScheduler

java.lang.Object
  extended by com.almende.eve.scheduler.RunnableSchedulerFactory.RunnableScheduler
All Implemented Interfaces:
Scheduler
Enclosing class:
RunnableSchedulerFactory

public class RunnableSchedulerFactory.RunnableScheduler
extends Object
implements Scheduler

The RunnableSchedular class is the interface which the agents can interact with. It can only be instantiated by the factory using the method getSchedular(agentId).


Method Summary
 void cancelTask(String taskId)
          Cancel a scheduled task by its id
 String createTask(JSONRequest request, long delay)
          Schedule a task
 Set<String> getTasks()
          Retrieve a list with all scheduled tasks
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createTask

public String createTask(JSONRequest request,
                         long delay)
Schedule a task

Specified by:
createTask in interface Scheduler
Parameters:
request - A JSONRequest with method and params
delay - The delay in milliseconds
Returns:
taskId

cancelTask

public void cancelTask(String taskId)
Cancel a scheduled task by its id

Specified by:
cancelTask in interface Scheduler
Parameters:
taskId -

getTasks

public Set<String> getTasks()
Retrieve a list with all scheduled tasks

Specified by:
getTasks in interface Scheduler
Returns:
taskIds


Copyright © 2013 Almende BV. All Rights Reserved.