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 in WorkflowJobSchedulingRequests 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 the SchedulerService 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

    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 new ScheduledJob that triggers the deployment specified via the WorkflowJobSchedulingRequest then sends a WorkflowRequestCompletion when finished, after successfully creating a job or encountering an error.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • 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 Details

    • handle

      @StreamListener("scheduleDeploymentInput") public void handle(org.springframework.messaging.Message<com.broadleafcommerce.data.tracking.core.transition.WorkflowJobSchedulingRequest> message)
      Creates a new ScheduledJob that triggers the deployment specified via the WorkflowJobSchedulingRequest then sends a WorkflowRequestCompletion when finished, after successfully creating a job or encountering an error.
      Specified by:
      handle in interface TrackingWorkflowJobSchedulingRequestListener
      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)