org.cishell.app.service.scheduler
Interface SchedulerListener

All Known Implementing Classes:
SchedulerAdapter

public interface SchedulerListener

A listener that is notified of events happening in a SchedulerService

Author:
Bruce Herr (bh2@bh2.net)

Method Summary
 void algorithmError(Algorithm algorithm, Throwable error)
          Notification that an Algorithm had an error while being executed
 void algorithmFinished(Algorithm algorithm, Data[] createdData)
          Notification that an Algorithm has finished executing
 void algorithmRescheduled(Algorithm algorithm, Calendar time)
          Notification that an already scheduled Algorithm has been rescheduled to be run at a different time
 void algorithmScheduled(Algorithm algorithm, Calendar time)
          Notification that an Algorithm has been scheduled to be run at a certain time
 void algorithmStarted(Algorithm algorithm)
          Notification that an Algorithm has started execution
 void algorithmUnscheduled(Algorithm algorithm)
          Notification that an already scheduled Algorithm has been unscheduled and will therefore not be run
 void schedulerCleared()
          Notification that the scheduler's schedule of Algorithms to be run has been cleared
 void schedulerRunStateChanged(boolean isRunning)
          Notification that the scheduler's run state (paused or unpaused) has changed
 

Method Detail

algorithmScheduled

void algorithmScheduled(Algorithm algorithm,
                        Calendar time)
Notification that an Algorithm has been scheduled to be run at a certain time

Parameters:
algorithm - The scheduled Algorithm
time - The time is scheduled to be run

algorithmRescheduled

void algorithmRescheduled(Algorithm algorithm,
                          Calendar time)
Notification that an already scheduled Algorithm has been rescheduled to be run at a different time

Parameters:
algorithm - The scheduled Algorithm
time - The new time the Algorithm is scheduled to be run

algorithmUnscheduled

void algorithmUnscheduled(Algorithm algorithm)
Notification that an already scheduled Algorithm has been unscheduled and will therefore not be run

Parameters:
algorithm - The scheduled Algorithm that was unscheduled

algorithmStarted

void algorithmStarted(Algorithm algorithm)
Notification that an Algorithm has started execution

Parameters:
algorithm - The scheduled algorithm

algorithmFinished

void algorithmFinished(Algorithm algorithm,
                       Data[] createdData)
Notification that an Algorithm has finished executing

Parameters:
algorithm - The scheduled Algorithm
createdData - The Data array it returned, or null if it returned null

algorithmError

void algorithmError(Algorithm algorithm,
                    Throwable error)
Notification that an Algorithm had an error while being executed

Parameters:
algorithm - The scheduled Algorithm
error - The error it threw while executing

schedulerRunStateChanged

void schedulerRunStateChanged(boolean isRunning)
Notification that the scheduler's run state (paused or unpaused) has changed

Parameters:
isRunning - true if it is now running, false if it is no longer running (paused)

schedulerCleared

void schedulerCleared()
Notification that the scheduler's schedule of Algorithms to be run has been cleared