Class ContextInstanceSchedulerService


  • public class ContextInstanceSchedulerService
    extends org.ikasan.quartz.AbstractDashboardSchedulerService
    • Field Summary

      • Fields inherited from class org.ikasan.quartz.AbstractDashboardSchedulerService

        CONTEXT_END_GROUP, CONTEXT_INSTANCE_ID, CONTEXT_START_GROUP, dashboardJobDetailsMap, dashboardJobsMap, NOTIFY_GROUP, scheduledJobFactory
    • Constructor Summary

      Constructors 
      Constructor Description
      ContextInstanceSchedulerService​(org.quartz.Scheduler scheduler, org.ikasan.scheduler.ScheduledJobFactory scheduledJobFactory, org.ikasan.spec.scheduled.context.service.ScheduledContextService scheduledContextService, org.ikasan.spec.scheduled.context.service.ContextInstanceRegistrationService contextInstanceRegistrationService, boolean isContextLifeCycleActive, boolean isIkasanEnterpriseSchedulerInstance)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void registerEndJobAndTrigger​(java.lang.String contextName, java.lang.String cronExpressionToTriggerJob, java.lang.String timezone, java.lang.String contextInstanceId)
      This sets up the context instance destroy job and its trigger.
      void registerJobs()
      Once the beans are created, interrogate the data source for the saved Schedule Details Kick off a start trigger for each contextName
      void registerStartJobAndTrigger​(java.lang.String contextName, java.lang.String cronExpressionToTriggerJob, java.lang.String timezone)
      This is the job for the start of context.
      • Methods inherited from class org.ikasan.quartz.AbstractDashboardSchedulerService

        addJob, getCronTrigger, getCronTriggerForEndJob, removeEndJobTrigger, removeJob, scheduleEndTrigger, showAllTriggers, unscheduleJob
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ContextInstanceSchedulerService

        public ContextInstanceSchedulerService​(org.quartz.Scheduler scheduler,
                                               org.ikasan.scheduler.ScheduledJobFactory scheduledJobFactory,
                                               org.ikasan.spec.scheduled.context.service.ScheduledContextService scheduledContextService,
                                               org.ikasan.spec.scheduled.context.service.ContextInstanceRegistrationService contextInstanceRegistrationService,
                                               boolean isContextLifeCycleActive,
                                               boolean isIkasanEnterpriseSchedulerInstance)
    • Method Detail

      • registerJobs

        @PostConstruct
        public void registerJobs()
        Once the beans are created, interrogate the data source for the saved Schedule Details Kick off a start trigger for each contextName
        Specified by:
        registerJobs in class org.ikasan.quartz.AbstractDashboardSchedulerService
      • registerStartJobAndTrigger

        public void registerStartJobAndTrigger​(java.lang.String contextName,
                                               java.lang.String cronExpressionToTriggerJob,
                                               java.lang.String timezone)
        This is the job for the start of context. Note that we don't register the destroy job yet, we wait till the job actually fires so we can pass the correct contextID to the destroy job.
        Parameters:
        contextName - to start
        cronExpressionToTriggerJob - to start at
        timezone - for the tme window
      • registerEndJobAndTrigger

        public void registerEndJobAndTrigger​(java.lang.String contextName,
                                             java.lang.String cronExpressionToTriggerJob,
                                             java.lang.String timezone,
                                             java.lang.String contextInstanceId)
        This sets up the context instance destroy job and its trigger. It will be typically called when the context instance is actually created / initialised
        Parameters:
        contextName - for the starting context to which this will be paired
        cronExpressionToTriggerJob - for this instance
        timezone - for the cron expression
        contextInstanceId - used to pair the destroy context instance with the correct create context instance.