public abstract class AbstractJobPerformable<T extends CronJobModel> extends Object implements JobPerformable<T>
JobPerformable interface providing ModelService and SessionService
as a member.| Modifier and Type | Field and Description |
|---|---|
protected FlexibleSearchService |
flexibleSearchService |
protected ModelService |
modelService |
protected SessionService |
sessionService |
| Constructor and Description |
|---|
AbstractJobPerformable() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
clearAbortRequestedIfNeeded(T myCronJob)
Checks if given
CronJobModel has a CronJobModel.REQUESTABORT flag set true -abort request was send
for this cron job. |
boolean |
isAbortable()
Checks whether the execution is implemented abortable.
|
boolean |
isPerformable()
Checks whether the execution can be performed at the moment.
|
abstract PerformResult |
perform(T cronJob)
The execution body for a
ServicelayerJob. |
void |
setFlexibleSearchService(FlexibleSearchService flexibleSearchService) |
void |
setModelService(ModelService modelService) |
void |
setSessionService(SessionService sessionService) |
protected ModelService modelService
protected SessionService sessionService
protected FlexibleSearchService flexibleSearchService
public abstract PerformResult perform(T cronJob)
JobPerformableServicelayerJob. Implement here your execution logic. It can be called
synchronous or asynchronous. So be aware of thread-safety. Method will return a result object saying if the
execution has reached end and if it was successful.perform in interface JobPerformable<T extends CronJobModel>cronJob - the related CronJob in whose context the execution will be performed.PerformResult that indicates whether the execution was successfully executed
or not and has finished or not.public boolean isAbortable()
JobPerformableisAbortable in interface JobPerformable<T extends CronJobModel>public boolean isPerformable()
JobPerformableisPerformable in interface JobPerformable<T extends CronJobModel>public void setModelService(ModelService modelService)
public void setSessionService(SessionService sessionService)
public void setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
protected final boolean clearAbortRequestedIfNeeded(T myCronJob)
CronJobModel has a CronJobModel.REQUESTABORT flag set true -abort request was send
for this cron job. If so then resets this flag to null and returns true. If no abort request abort was send
returns false.Copyright © 2017 SAP SE. All Rights Reserved.