Class DeploymentJobSchedulingRequestListener
- java.lang.Object
-
- com.broadleafcommerce.scheduledjob.messaging.transition.DeploymentJobSchedulingRequestListener
-
- All Implemented Interfaces:
TrackingWorkflowJobSchedulingRequestListener
public class DeploymentJobSchedulingRequestListener extends Object implements TrackingWorkflowJobSchedulingRequestListener
This handler specializes inWorkflowJobSchedulingRequests
and is the main component that listens for the sandbox service to send it a request to schedule a deployment job. Eventually once the job is saved in the persistent store it is eventually picked up by theSchedulerService
to actually execute the job.- Author:
- Nathan Moore (nathandmoore)
-
-
Constructor Summary
Constructors Constructor Description DeploymentJobSchedulingRequestListener(ScheduledJobService<ScheduledJob> scheduledJobService, com.broadleafcommerce.common.extension.TypeFactory jobFactory, com.broadleafcommerce.data.tracking.core.transition.WorkflowRequestCompletionNotifier completionNotifier, com.broadleafcommerce.common.messaging.notification.NotificationManager notificationManager, ScheduledJobRepository<?> repository, 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.WorkflowJobSchedulingRequest> message)
void
handle(org.springframework.messaging.Message<com.broadleafcommerce.data.tracking.core.transition.WorkflowJobSchedulingRequest> message)
Creates a newScheduledJob
that triggers the deployment specified via theWorkflowJobSchedulingRequest
then sends aWorkflowRequestCompletion
when finished, after successfully creating a job or encountering an error.
-
-
-
Constructor Detail
-
DeploymentJobSchedulingRequestListener
public DeploymentJobSchedulingRequestListener(ScheduledJobService<ScheduledJob> scheduledJobService, com.broadleafcommerce.common.extension.TypeFactory jobFactory, com.broadleafcommerce.data.tracking.core.transition.WorkflowRequestCompletionNotifier completionNotifier, com.broadleafcommerce.common.messaging.notification.NotificationManager notificationManager, ScheduledJobRepository<?> repository, com.broadleafcommerce.common.extension.data.DataRouteSupporting route, com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService idempotentConsumptionService)
-
-
Method Detail
-
handle
@StreamListener("scheduleDeploymentInput") public void handle(org.springframework.messaging.Message<com.broadleafcommerce.data.tracking.core.transition.WorkflowJobSchedulingRequest> message)
Creates a newScheduledJob
that triggers the deployment specified via theWorkflowJobSchedulingRequest
then sends aWorkflowRequestCompletion
when finished, after successfully creating a job or encountering an error.- Specified by:
handle
in interfaceTrackingWorkflowJobSchedulingRequestListener
- Parameters:
message
- a workflow job scheduling request with info needed to create a new scheduled job
-
doHandle
protected void doHandle(@NonNull @NonNull org.springframework.messaging.Message<com.broadleafcommerce.data.tracking.core.transition.WorkflowJobSchedulingRequest> message)
-
-