org.cishell.app.service.scheduler
Class SchedulerAdapter

java.lang.Object
  extended by org.cishell.app.service.scheduler.SchedulerAdapter
All Implemented Interfaces:
SchedulerListener

public abstract class SchedulerAdapter
extends Object
implements SchedulerListener

An abstract adapter class for notification of events happening in a SchedulerService. The methods in this class are empty. This class exists as a convenience for creating listener objects.

Author:
Bruce Herr (bh2@bh2.net)

Constructor Summary
SchedulerAdapter()
           
 
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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchedulerAdapter

public SchedulerAdapter()
Method Detail

algorithmError

public void algorithmError(Algorithm algorithm,
                           Throwable error)
Description copied from interface: SchedulerListener
Notification that an Algorithm had an error while being executed

Specified by:
algorithmError in interface SchedulerListener
Parameters:
algorithm - The scheduled Algorithm
error - The error it threw while executing

algorithmFinished

public void algorithmFinished(Algorithm algorithm,
                              Data[] createdData)
Description copied from interface: SchedulerListener
Notification that an Algorithm has finished executing

Specified by:
algorithmFinished in interface SchedulerListener
Parameters:
algorithm - The scheduled Algorithm
createdData - The Data array it returned, or null if it returned null

algorithmRescheduled

public void algorithmRescheduled(Algorithm algorithm,
                                 Calendar time)
Description copied from interface: SchedulerListener
Notification that an already scheduled Algorithm has been rescheduled to be run at a different time

Specified by:
algorithmRescheduled in interface SchedulerListener
Parameters:
algorithm - The scheduled Algorithm
time - The new time the Algorithm is scheduled to be run

algorithmUnscheduled

public void algorithmUnscheduled(Algorithm algorithm)
Description copied from interface: SchedulerListener
Notification that an already scheduled Algorithm has been unscheduled and will therefore not be run

Specified by:
algorithmUnscheduled in interface SchedulerListener
Parameters:
algorithm - The scheduled Algorithm that was unscheduled

algorithmScheduled

public void algorithmScheduled(Algorithm algorithm,
                               Calendar time)
Description copied from interface: SchedulerListener
Notification that an Algorithm has been scheduled to be run at a certain time

Specified by:
algorithmScheduled in interface SchedulerListener
Parameters:
algorithm - The scheduled Algorithm
time - The time is scheduled to be run

algorithmStarted

public void algorithmStarted(Algorithm algorithm)
Description copied from interface: SchedulerListener
Notification that an Algorithm has started execution

Specified by:
algorithmStarted in interface SchedulerListener
Parameters:
algorithm - The scheduled algorithm

schedulerCleared

public void schedulerCleared()
Description copied from interface: SchedulerListener
Notification that the scheduler's schedule of Algorithms to be run has been cleared

Specified by:
schedulerCleared in interface SchedulerListener

schedulerRunStateChanged

public void schedulerRunStateChanged(boolean isRunning)
Description copied from interface: SchedulerListener
Notification that the scheduler's run state (paused or unpaused) has changed

Specified by:
schedulerRunStateChanged in interface SchedulerListener
Parameters:
isRunning - true if it is now running, false if it is no longer running (paused)