psdi.server

Class DebugCronTask

  • All Implemented Interfaces:
    CronTask


    public class DebugCronTask
    extends SimpleCronTask
    SimpleCronTask is an abstract class that provides default implementations for the majority of the methods in the CronTask interface.
    See Also:
    CronTaskManager, CronTask, psdi.test.CronErrorTest
    • Constructor Detail

      • DebugCronTask

        public DebugCronTask()
    • Method Detail

      • isOKToRun

        public boolean isOKToRun(MXServerRemote server)
        Description copied from class: SimpleCronTask
        Default implementation of isOKToRun. It always returns true.
        Specified by:
        isOKToRun in interface CronTask
        Overrides:
        isOKToRun in class SimpleCronTask
        Returns:
        true if it is OK to run, false otherwise.
        See Also:
        psdi.server.CronTask#isOKToRun();
      • cronAction

        public void cronAction()
        This is the CORE METHOD of this class. You should invoke whatever logic you want your CronTask to perform from this method. This method should
        1. check the shutdown variable before invoking any processing logic.
        2. call resetErrorCount() if processing proceeds w/out error.
        3. call incErrorCount() if a serious error occurs during the processing logic.
        Specified by:
        cronAction in interface CronTask
        Specified by:
        cronAction in class SimpleCronTask
      • shutdown

        public void shutdown()
        Sets the shutdown variable. The cronAction() method should check the shutdown variable and stop processing once shutdown == true.
        Specified by:
        shutdown in interface CronTask
        Overrides:
        shutdown in class SimpleCronTask
      • stop

        public void stop()
        Default implementation for stop(). It does nothing.
        Specified by:
        stop in interface CronTask
        Overrides:
        stop in class SimpleCronTask
      • getParameters

        public CrontaskParamInfo[] getParameters()
                                          throws MXException,
                                                 java.rmi.RemoteException
        Description copied from interface: CronTask
        This method provides an array of CrontaskParamInfo() object to describe all the parameters of the crontask. Parameter name, default values and the description of the parameter should be set to the CrontaskParamInfo object for each parameter. If default value and description is not set, null will be the values.
        Specified by:
        getParameters in interface CronTask
        Overrides:
        getParameters in class SimpleCronTask
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        CrontaskParamInfo