railo.runtime.schedule
Interface Scheduler


public interface Scheduler

Scheduler interface


Method Summary
 void addScheduleTask(ScheduleTask task, boolean allowOverwrite)
          Adds a Task to the scheduler
 void execute()
          execute all containing tasks
 ScheduleTask[] getAllScheduleTasks()
          returns all schedule tasks valid or not
 LogAndSource getLogger()
           
 long getNextExecutionTime()
           
 ScheduleTask getScheduleTask(java.lang.String name)
          returns a schedule tasks matching given name or throws a exception
 ScheduleTask getScheduleTask(java.lang.String name, ScheduleTask defaultValue)
          returns a schedule tasks matching given name or null
 void removeScheduleTask(java.lang.String name, boolean throwWhenNotExist)
          removes a task from scheduler
 void runScheduleTask(java.lang.String name, boolean throwWhenNotExist)
          runs a scheduler task
 

Method Detail

getScheduleTask

public ScheduleTask getScheduleTask(java.lang.String name)
                             throws ScheduleException
returns a schedule tasks matching given name or throws a exception

Parameters:
name - Task name of Schedule Task to get
Returns:
matching task
Throws:
ScheduleException

getAllScheduleTasks

public ScheduleTask[] getAllScheduleTasks()
returns all schedule tasks valid or not

Returns:
all tasks

getScheduleTask

public ScheduleTask getScheduleTask(java.lang.String name,
                                    ScheduleTask defaultValue)
returns a schedule tasks matching given name or null

Parameters:
name - Task name of Schedule Task to get
defaultValue -
Returns:
matching task

addScheduleTask

public void addScheduleTask(ScheduleTask task,
                            boolean allowOverwrite)
                     throws ScheduleException,
                            java.io.IOException
Adds a Task to the scheduler

Parameters:
task -
allowOverwrite -
Throws:
ScheduleException
java.io.IOException

removeScheduleTask

public void removeScheduleTask(java.lang.String name,
                               boolean throwWhenNotExist)
                        throws java.io.IOException,
                               ScheduleException
removes a task from scheduler

Parameters:
name - name of the task to remove
throwWhenNotExist - define if method throws a exception if task doesn't exist
Throws:
java.io.IOException
ScheduleException

runScheduleTask

public void runScheduleTask(java.lang.String name,
                            boolean throwWhenNotExist)
                     throws java.io.IOException,
                            ScheduleException
runs a scheduler task

Parameters:
name -
throwWhenNotExist -
Throws:
java.io.IOException
ScheduleException

execute

public void execute()
execute all containing tasks


getNextExecutionTime

public long getNextExecutionTime()
Returns:
Returns the nextExecutionTime.

getLogger

public LogAndSource getLogger()
Returns:
Returns the logFile.