Class ContextInstanceRegistrationServiceImpl

  • All Implemented Interfaces:
    org.ikasan.spec.scheduled.context.service.ContextInstanceRegistrationService

    public class ContextInstanceRegistrationServiceImpl
    extends ContextInstanceServiceBase
    implements org.ikasan.spec.scheduled.context.service.ContextInstanceRegistrationService
    • Constructor Detail

      • ContextInstanceRegistrationServiceImpl

        public ContextInstanceRegistrationServiceImpl​(java.lang.String queueDirectory,
                                                      org.ikasan.spec.scheduled.instance.service.ScheduledContextInstanceService scheduledContextInstanceService,
                                                      org.ikasan.spec.scheduled.job.service.JobInitiationService jobInitiationService,
                                                      org.ikasan.spec.metadata.ModuleMetaDataService moduleMetadataService,
                                                      org.ikasan.spec.scheduled.job.service.InternalEventDrivenJobService internalEventDrivenJobService,
                                                      org.ikasan.spec.scheduled.instance.service.ContextParametersInstanceService contextParametersInstanceService,
                                                      org.ikasan.spec.scheduled.instance.service.ContextInstancePublicationService contextInstancePublicationService,
                                                      org.ikasan.spec.scheduled.joblock.service.JobLockCacheService jobLockCacheService,
                                                      org.ikasan.spec.scheduled.context.service.ScheduledContextService scheduledContextService,
                                                      org.ikasan.spec.scheduled.instance.service.SchedulerJobInstanceService schedulerJobInstanceService,
                                                      org.ikasan.spec.scheduled.event.service.ContextInstanceStateChangeEventBroadcaster contextInstanceStateChangeEventBroadcaster,
                                                      org.ikasan.spec.scheduled.event.service.SchedulerJobStateChangeEventBroadcaster schedulerJobStateChangeEventBroadcaster,
                                                      org.ikasan.spec.scheduled.joblock.service.JobLockCacheInitialisationService jobLockCacheInitialisationService,
                                                      org.ikasan.job.orchestration.context.register.ContextInstanceSchedulerService contextInstanceSchedulerService,
                                                      org.ikasan.job.orchestration.context.util.TimeService timeService,
                                                      org.ikasan.spec.scheduled.event.service.ContextInstanceSavedEventBroadcaster contextInstanceSavedEventBroadcaster,
                                                      org.ikasan.spec.systemevent.SystemEventService systemEventService,
                                                      boolean isIkasanEnterpriseSchedulerInstance)
    • Method Detail

      • deRegisterByName

        public void deRegisterByName​(java.lang.String contextName)
        Remove the all contextInstance associated with this context name, all jobsDetails & triggers. This will be invoked, for example, by the UI.
        Specified by:
        deRegisterByName in interface org.ikasan.spec.scheduled.context.service.ContextInstanceRegistrationService
        Parameters:
        contextName - / plan for which we need to deregister.
      • deregisterManually

        public void deregisterManually​(java.lang.String contextInstanceId)
        Specified by:
        deregisterManually in interface org.ikasan.spec.scheduled.context.service.ContextInstanceRegistrationService
      • deRegisterById

        public void deRegisterById​(java.lang.String contextInstanceId)
        Remove the contextInstance associated with the context instance ID This will be invoked from a plan end cron trigger.
        Specified by:
        deRegisterById in interface org.ikasan.spec.scheduled.context.service.ContextInstanceRegistrationService
        Parameters:
        contextInstanceId - / plan for which we need to deregister.
      • reSchedule

        public void reSchedule​(java.lang.String contextName)
        Specified by:
        reSchedule in interface org.ikasan.spec.scheduled.context.service.ContextInstanceRegistrationService
      • prepareFutureContextInstance

        public void prepareFutureContextInstance​(java.lang.String contextName)
        Specified by:
        prepareFutureContextInstance in interface org.ikasan.spec.scheduled.context.service.ContextInstanceRegistrationService
        Overrides:
        prepareFutureContextInstance in class ContextInstanceServiceBase
      • register

        public void register​(java.lang.String contextName)
        Create a new instance of the plan and register it. This will be invoked when a plan start trigger fires. It will fire even if the plan is disabled, but will not create a new context.
        Specified by:
        register in interface org.ikasan.spec.scheduled.context.service.ContextInstanceRegistrationService
        Parameters:
        contextName - i.e. plan to create instance for
      • register

        public java.lang.String register​(java.lang.String contextName,
                                         java.util.List<org.ikasan.spec.scheduled.instance.model.ContextParameterInstance> contextParameterInstances)
        Create a new instance of the plan and register it. This will be invoked when a plan is cloned or manually created by the end user using the UI It will fire even if the plan is disabled, but will not create a new context.
        Specified by:
        register in interface org.ikasan.spec.scheduled.context.service.ContextInstanceRegistrationService
        Parameters:
        contextName - i.e. plan to create instance for
        contextParameterInstances - the param instances for the context
        Returns:
        the context instance ID if a new context instance was created, null otherwise.