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
Fields Modifier and Type Field Description static JobExecutionResultImplCANCELLEDConstant object for the cancelled case.static JobExecutionResultImplFAILEDConstant object for the failed case.static JobExecutionResultImplSUCCEEDEDConstant object for the success case.
-
Constructor Summary
Constructors Constructor Description JobExecutionResultImpl(InternalJobState state, String message, Long retryDelayInMs)Create a new result
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancancelled()booleanfailed()StringgetMessage()LonggetRetryDelayInMs()InternalJobStategetState()Get the internal statebooleansucceeded()StringtoString()
-
-
-
Field Detail
-
SUCCEEDED
public static final JobExecutionResultImpl SUCCEEDED
Constant object for the success case.
-
CANCELLED
public static final JobExecutionResultImpl CANCELLED
Constant object for the cancelled case.
-
FAILED
public static final JobExecutionResultImpl FAILED
Constant object for the failed case.
-
-
Constructor Detail
-
JobExecutionResultImpl
public JobExecutionResultImpl(InternalJobState state, String message, Long retryDelayInMs)
Create a new result- Parameters:
state- The result statemessage- Optional MessageretryDelayInMs- Optional retry delay
-
-
Method Detail
-
getState
public InternalJobState getState()
Get the internal state- Returns:
- The state.
-
succeeded
public boolean succeeded()
- Specified by:
succeededin interfaceorg.apache.sling.event.jobs.consumer.JobExecutionResult
-
cancelled
public boolean cancelled()
- Specified by:
cancelledin interfaceorg.apache.sling.event.jobs.consumer.JobExecutionResult
-
failed
public boolean failed()
- Specified by:
failedin interfaceorg.apache.sling.event.jobs.consumer.JobExecutionResult
-
getMessage
public String getMessage()
- Specified by:
getMessagein interfaceorg.apache.sling.event.jobs.consumer.JobExecutionResult
-
getRetryDelayInMs
public Long getRetryDelayInMs()
- Specified by:
getRetryDelayInMsin interfaceorg.apache.sling.event.jobs.consumer.JobExecutionResult
-
-