Class DeploymentJobUnschedulingRequestListener
java.lang.Object
com.broadleafcommerce.scheduledjob.messaging.transition.DeploymentJobUnschedulingRequestListener
- All Implemented Interfaces:
TrackingWorkflowJobUnschedulingRequestListener
public class DeploymentJobUnschedulingRequestListener
extends Object
implements TrackingWorkflowJobUnschedulingRequestListener
This handler specializes in
WorkflowJobUnschedulingRequests and is the main component that listens for the sandbox service
to send it a request to cancel a previously scheduled deployment job.- Author:
- Samarth Dhruva (samarthd)
-
Constructor Summary
ConstructorsConstructorDescriptionDeploymentJobUnschedulingRequestListener(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
Modifier and TypeMethodDescriptionprotected voiddoHandle(@NonNull org.springframework.messaging.Message<com.broadleafcommerce.data.tracking.core.transition.WorkflowJobUnschedulingRequest> message) voidhandle(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 Details
-
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 Details
-
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 forWorkflowRequestCompletionProducer.TYPEis reset. This ensures that state set by otherWorkflowRequestCompletionProducer.TYPEevents is wiped and cannot interfere with the unschedule flow.After that, the job is deleted and a
WorkflowRequestCompletionevent is emitted.- Specified by:
handlein interfaceTrackingWorkflowJobUnschedulingRequestListener- 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)
-