Class ScheduleManager

java.lang.Object
org.frankframework.lifecycle.AbstractConfigurableLifecyle
org.frankframework.configuration.ScheduleManager
All Implemented Interfaces:
AutoCloseable, IConfigurable, ConfigurableLifecycle, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle

@FrankDocGroup(OTHER) public class ScheduleManager extends AbstractConfigurableLifecyle implements org.springframework.context.ApplicationContextAware, AutoCloseable
Container for jobs that are scheduled for periodic execution.

Configure/start/stop lifecycles are managed by Spring.

Author:
Niels Meijer
See Also:
  • Constructor Details

    • ScheduleManager

      public ScheduleManager()
  • Method Details

    • configure

      public void configure() throws ConfigurationException
      Description copied from interface: IConfigurable
      Configure this component.

      configure() is called once at startup of the framework in the configure method of the owner of this IConfigurable. Purpose of this method is to check whether the static configuration of the object is correct. As much as possible class-instantiating should take place in the configure(), to improve performance.

      In the case of a container, this will propagate the configure signal to all components that apply.

      Specified by:
      configure in interface IConfigurable
      Throws:
      ConfigurationException - in case it was not able to configure the component.
    • getPhase

      public int getPhase()
      Specified by:
      getPhase in interface ConfigurableLifecycle
      Specified by:
      getPhase in interface org.springframework.context.Phased
      Specified by:
      getPhase in interface org.springframework.context.SmartLifecycle
    • start

      public void start()
      Configure and start, managed through the Spring Lifecyle
      Specified by:
      start in interface org.springframework.context.Lifecycle
    • stop

      public void stop()
      remove all registered jobs
      Specified by:
      stop in interface org.springframework.context.Lifecycle
    • close

      public void close() throws Exception
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception
    • addScheduledJob

      public void addScheduledJob(IJob job)
      Job that is executed periodically. The time of execution can be configured within the job or from outside the configuration through the Frank!Console.
    • unRegister

      public void unRegister(IJob job)
    • getSchedules

      public final Map<String,IJob> getSchedules()
    • getSchedulesList

      public List<IJob> getSchedulesList()
    • getSchedule

      public IJob getSchedule(String name)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getApplicationContext

      public org.springframework.context.ApplicationContext getApplicationContext()
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
    • getSchedulerHelper

      public SchedulerHelper getSchedulerHelper()
    • setSchedulerHelper

      public void setSchedulerHelper(SchedulerHelper schedulerHelper)