Class DeploymentJobUnschedulingRequestListener

    • Constructor Summary

      Constructors 
      Constructor Description
      DeploymentJobUnschedulingRequestListener​(ScheduledJobService<ScheduledJob> scheduledJobService, com.broadleafcommerce.data.tracking.core.transition.WorkflowRequestCompletionNotifier completionNotifier, com.broadleafcommerce.common.messaging.notification.NotificationManager notificationManager, ScheduledJobRepository<com.broadleafcommerce.data.tracking.core.Trackable> scheduledJobRepository, com.broadleafcommerce.common.extension.data.DataRouteSupporting route, com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService idempotentConsumptionService)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void doHandle​(@NonNull org.springframework.messaging.Message<com.broadleafcommerce.data.tracking.core.transition.WorkflowJobUnschedulingRequest> message)  
      void handle​(org.springframework.messaging.Message<com.broadleafcommerce.data.tracking.core.transition.WorkflowJobUnschedulingRequest> message)
      First, this method finds the scheduled job whose details match the given request.
    • Constructor Detail

      • DeploymentJobUnschedulingRequestListener

        public DeploymentJobUnschedulingRequestListener​(ScheduledJobService<ScheduledJob> scheduledJobService,
                                                        com.broadleafcommerce.data.tracking.core.transition.WorkflowRequestCompletionNotifier completionNotifier,
                                                        com.broadleafcommerce.common.messaging.notification.NotificationManager notificationManager,
                                                        ScheduledJobRepository<com.broadleafcommerce.data.tracking.core.Trackable> scheduledJobRepository,
                                                        com.broadleafcommerce.common.extension.data.DataRouteSupporting route,
                                                        com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService idempotentConsumptionService)
    • Method Detail

      • handle

        @StreamListener("unscheduleDeploymentInput")
        public void handle​(org.springframework.messaging.Message<com.broadleafcommerce.data.tracking.core.transition.WorkflowJobUnschedulingRequest> message)
        First, this method finds the scheduled job whose details match the given request. If found, that job's notification state container for WorkflowRequestCompletionProducer.TYPE is reset. This ensures that state set by other WorkflowRequestCompletionProducer.TYPE events is wiped and cannot interfere with the unschedule flow.

        After that, the job is deleted and a WorkflowRequestCompletion event is emitted.

        Specified by:
        handle in interface TrackingWorkflowJobUnschedulingRequestListener
        Parameters:
        message - a message of an unscheduling request with info needed to unschedule a previously scheduled deployment job
      • doHandle

        protected void doHandle​(@NonNull
                                @NonNull org.springframework.messaging.Message<com.broadleafcommerce.data.tracking.core.transition.WorkflowJobUnschedulingRequest> message)