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 inWorkflowJobUnschedulingRequests
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
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 forWorkflowRequestCompletionProducer.TYPE
is reset. This ensures that state set by otherWorkflowRequestCompletionProducer.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 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)
-
-