Class JobExecutionResultImpl
java.lang.Object
org.apache.sling.event.impl.jobs.queues.JobExecutionResultImpl
- All Implemented Interfaces:
org.apache.sling.event.jobs.consumer.JobExecutionResult
public class JobExecutionResultImpl
extends Object
implements org.apache.sling.event.jobs.consumer.JobExecutionResult
The job execution result.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final JobExecutionResultImpl
Constant object for the cancelled case.static final JobExecutionResultImpl
Constant object for the failed case.static final JobExecutionResultImpl
Constant object for the success case. -
Constructor Summary
ConstructorDescriptionJobExecutionResultImpl
(InternalJobState state, String message, Long retryDelayInMs) Create a new result -
Method Summary
-
Field Details
-
SUCCEEDED
Constant object for the success case. -
CANCELLED
Constant object for the cancelled case. -
FAILED
Constant object for the failed case.
-
-
Constructor Details
-
JobExecutionResultImpl
Create a new result- Parameters:
state
- The result statemessage
- Optional MessageretryDelayInMs
- Optional retry delay
-
-
Method Details
-
getState
Get the internal state- Returns:
- The state.
-
succeeded
public boolean succeeded()- Specified by:
succeeded
in interfaceorg.apache.sling.event.jobs.consumer.JobExecutionResult
-
cancelled
public boolean cancelled()- Specified by:
cancelled
in interfaceorg.apache.sling.event.jobs.consumer.JobExecutionResult
-
failed
public boolean failed()- Specified by:
failed
in interfaceorg.apache.sling.event.jobs.consumer.JobExecutionResult
-
getMessage
- Specified by:
getMessage
in interfaceorg.apache.sling.event.jobs.consumer.JobExecutionResult
-
getRetryDelayInMs
- Specified by:
getRetryDelayInMs
in interfaceorg.apache.sling.event.jobs.consumer.JobExecutionResult
-
toString
-