Class DataFeedExecutionRequestScheduledJobListener
java.lang.Object
com.broadleafcommerce.datafeed.messaging.listener.DataFeedExecutionRequestScheduledJobListener
@DataRouteByKey("datafeed")
public class DataFeedExecutionRequestScheduledJobListener
extends Object
A listener that accepts triggered scheduled job events of type
DATA_FEED_EXECUTION_REQUEST_JOBTYPE
.-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The scheduled job must have this as itsScheduledJobRef.getType()
in order to be handled by this listener.static final String
ScheduledJobRef.getDetails()
must contain an entry with this as theScheduledJobDetailRef.getName()
, and must provide an appropriateDataFeedProcess.getId()
as its value. -
Constructor Summary
ConstructorDescriptionDataFeedExecutionRequestScheduledJobListener
(com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService idempotentConsumptionService, DataFeedProcessExecutionManager dataFeedProcessExecutionManager, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected DataFeedProcessExecutionManager
getDataFeedProcessId
(com.broadleafcommerce.common.messaging.domain.ScheduledJobRef scheduledJobRef) Gets the data feed process ID whose execution is requested.protected com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService
protected com.broadleafcommerce.common.extension.TypeFactory
void
listen
(org.springframework.messaging.Message<com.broadleafcommerce.common.messaging.domain.ScheduledJobRef> message) protected void
processMessage
(org.springframework.messaging.Message<com.broadleafcommerce.common.messaging.domain.ScheduledJobRef> message)
-
Field Details
-
DATA_FEED_EXECUTION_REQUEST_JOBTYPE
The scheduled job must have this as itsScheduledJobRef.getType()
in order to be handled by this listener.- See Also:
-
DATA_FEED_PROCESS_ID_SCHEDULED_JOB_DETAIL_NAME
ScheduledJobRef.getDetails()
must contain an entry with this as theScheduledJobDetailRef.getName()
, and must provide an appropriateDataFeedProcess.getId()
as its value.- See Also:
-
-
Constructor Details
-
DataFeedExecutionRequestScheduledJobListener
public DataFeedExecutionRequestScheduledJobListener(com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService idempotentConsumptionService, DataFeedProcessExecutionManager dataFeedProcessExecutionManager, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
Method Details
-
listen
@StreamListener("triggeredJobEventInputDataFeedExecutionRequest") public void listen(org.springframework.messaging.Message<com.broadleafcommerce.common.messaging.domain.ScheduledJobRef> message) -
processMessage
protected void processMessage(org.springframework.messaging.Message<com.broadleafcommerce.common.messaging.domain.ScheduledJobRef> message) -
getDataFeedProcessId
protected Optional<String> getDataFeedProcessId(com.broadleafcommerce.common.messaging.domain.ScheduledJobRef scheduledJobRef) Gets the data feed process ID whose execution is requested.- Parameters:
scheduledJobRef
- the scheduled job payload- Returns:
- the data feed process ID whose execution is requested, if found
-
getIdempotentConsumptionService
protected com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService getIdempotentConsumptionService() -
getDataFeedProcessExecutionManager
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
-