Class SchedulerController

  • All Implemented Interfaces:
    Serializable
    Direct Known Subclasses:
    WorkflowSchedulerController

    @Named
    @RequestScoped
    public class SchedulerController
    extends Object
    implements Serializable
    The SchedulerController is a front-end controller to start and stop schedulers. A scheduler configuration is defined by the item type="scheduler" and the item name.

    The class can be subclassed to add specific data to the scheduler configuration.

    Version:
    1.0
    Author:
    rsoika
    See Also:
    Serialized Form
    • Constructor Detail

      • SchedulerController

        public SchedulerController()
    • Method Detail

      • init

        @PostConstruct
        public void init()
        This method load the config entity after postContstruct. If no Entity exists than the ConfigService EJB creates a new config entity.
      • getName

        public String getName()
      • setName

        public void setName​(String name)
      • getSchedulerClass

        public String getSchedulerClass()
      • setSchedulerClass

        public void setSchedulerClass​(String schedulerClass)
      • setConfiguration

        public void setConfiguration​(ItemCollection configuration)
      • saveConfiguration

        public void saveConfiguration()
        Saves the current scheduler configuration.
      • refresh

        public void refresh()
        This method updates the scheduler configuration with the current timer information
      • stopScheduler

        public void stopScheduler()
      • restartScheduler

        public void restartScheduler​(jakarta.faces.event.ActionEvent event)
                              throws Exception
        Throws:
        Exception
      • millisToShortDHMS

        public String millisToShortDHMS​(int duration)
        converts time (in milliseconds) to human-readable format "hh:mm:ss"
        Returns: