@ProviderType public interface Job
getProperty(String, Class)
method to get the correct type instead of directly casting it.Modifier and Type | Interface and Description |
---|---|
static class |
Job.JobState
The current job state.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROPERTY_FINISHED_DATE
This property contains the finished date once a job is marked as finished.
|
static java.lang.String |
PROPERTY_JOB_CREATED
This property is set by the job handling and contains a calendar object
specifying the date and time when this job has been created.
|
static java.lang.String |
PROPERTY_JOB_CREATED_INSTANCE
This property is set by the job handling and contains the Sling instance ID
of the instance where this job has been created.
|
static java.lang.String |
PROPERTY_JOB_DESCRIPTION
This is an optional property containing a human readable description for
the job
|
static java.lang.String |
PROPERTY_JOB_PROGRESS_ETA
This property contains the optional ETA for a job.
|
static java.lang.String |
PROPERTY_JOB_PROGRESS_LOG
This property contains the optional output log of a job consumer.
|
static java.lang.String |
PROPERTY_JOB_PROGRESS_STEP
This property contains optional progress information about a job,
the number of completed steps.
|
static java.lang.String |
PROPERTY_JOB_PROGRESS_STEPS
This property contains optional progress information about a job,
the number of steps the job consumer will perform.
|
static java.lang.String |
PROPERTY_JOB_QUEUE_NAME
The name of the job queue processing this job.
|
static java.lang.String |
PROPERTY_JOB_RETRIES
The property to track the retry maximum retry count for jobs.
|
static java.lang.String |
PROPERTY_JOB_RETRY_COUNT
The property to track the retry count for jobs.
|
static java.lang.String |
PROPERTY_JOB_RETRY_DELAY
The property to set a retry delay.
|
static java.lang.String |
PROPERTY_JOB_STARTED_TIME
This property is set by the job handling and contains a calendar object
specifying the date and time when this job has been started.
|
static java.lang.String |
PROPERTY_JOB_TARGET_INSTANCE
This property is set by the job handling and contains the Sling instance ID
of the instance where this job should be processed.
|
static java.lang.String |
PROPERTY_JOB_TITLE
This is an optional property containing a human readable title for
the job
|
static java.lang.String |
PROPERTY_RESULT_MESSAGE
This property contains the optional result message of a job consumer.
|
Modifier and Type | Method and Description |
---|---|
java.util.Calendar |
getCreated()
This property is set by the job handling and contains a calendar object
specifying the date and time when this job has been created.
|
java.lang.String |
getCreatedInstance()
This property is set by the job handling and contains the Sling instance ID
of the instance where this job has been created.
|
java.util.Calendar |
getFinishedDate()
If the job is cancelled or succeeded, this method will return the finish date.
|
int |
getFinishedProgressStep()
If the job is in processing, return the optional information
about the finished steps.
|
java.lang.String |
getId()
Unique job ID.
|
Job.JobState |
getJobState()
Get the job state
|
int |
getNumberOfRetries()
The property to track the retry maximum retry count for jobs.
|
java.util.Calendar |
getProcessingStarted()
This property is set by the job handling and contains a calendar object
specifying the date and time when this job has been started.
|
java.util.Calendar |
getProgressETA()
If the job is in processing, return the optional ETA for this job.
|
java.lang.String[] |
getProgressLog()
This method returns the optional progress log from the last job
processing.
|
int |
getProgressStepCount()
If the job is in processing, return the optional progress step
count if available.
|
java.lang.Object |
getProperty(java.lang.String name)
Get the value of a property.
|
<T> T |
getProperty(java.lang.String name,
java.lang.Class<T> type)
Get a named property and convert it into the given type.
|
<T> T |
getProperty(java.lang.String name,
T defaultValue)
Get a named property and convert it into the given type.
|
java.util.Set<java.lang.String> |
getPropertyNames()
Get all property names.
|
java.lang.String |
getQueueName()
The name of the job queue processing this job.
|
java.lang.String |
getResultMessage()
This method returns the message from the last job processing, regardless
whether the processing failed, succeeded or was cancelled.
|
int |
getRetryCount()
On first execution the value of this property is zero.
|
java.lang.String |
getTargetInstance()
This property is set by the job handling and contains the Sling instance ID
of the instance where this job should be processed.
|
java.lang.String |
getTopic()
The job topic.
|
static final java.lang.String PROPERTY_JOB_QUEUE_NAME
static final java.lang.String PROPERTY_JOB_RETRY_COUNT
static final java.lang.String PROPERTY_JOB_RETRIES
static final java.lang.String PROPERTY_JOB_CREATED
static final java.lang.String PROPERTY_JOB_CREATED_INSTANCE
static final java.lang.String PROPERTY_JOB_TARGET_INSTANCE
static final java.lang.String PROPERTY_JOB_STARTED_TIME
static final java.lang.String PROPERTY_JOB_RETRY_DELAY
static final java.lang.String PROPERTY_JOB_PROGRESS_LOG
static final java.lang.String PROPERTY_JOB_PROGRESS_ETA
Calendar
object.
This property is read-only and can't be specified when the job is created.static final java.lang.String PROPERTY_JOB_PROGRESS_STEPS
static final java.lang.String PROPERTY_JOB_PROGRESS_STEP
static final java.lang.String PROPERTY_RESULT_MESSAGE
static final java.lang.String PROPERTY_FINISHED_DATE
Calendar
object.
This property is read-only and can't be specified when the job is created.static final java.lang.String PROPERTY_JOB_TITLE
static final java.lang.String PROPERTY_JOB_DESCRIPTION
java.lang.String getTopic()
java.lang.String getId()
java.lang.Object getProperty(java.lang.String name)
name
- The property namenull
java.util.Set<java.lang.String> getPropertyNames()
<T> T getProperty(java.lang.String name, java.lang.Class<T> type)
null
in this
case.T
- The class of the typename
- The name of the propertytype
- The class of the typenull
if
non existing or can't be converted.<T> T getProperty(java.lang.String name, T defaultValue)
T
- The class of the typename
- The name of the propertydefaultValue
- The default value to use if the named property does
not exist or cannot be converted to the requested type. The
default value is also used to define the type to convert the
value to. If this is null
any existing property is
not converted.int getRetryCount()
int getNumberOfRetries()
java.lang.String getQueueName()
null
java.lang.String getTargetInstance()
null
java.util.Calendar getProcessingStarted()
null
.java.util.Calendar getCreated()
java.lang.String getCreatedInstance()
Job.JobState getJobState()
java.util.Calendar getFinishedDate()
null
java.lang.String getResultMessage()
null
java.lang.String[] getProgressLog()
null
int getProgressStepCount()
-1
.int getFinishedProgressStep()
getProgressStepCount()
this can
be used to calculate a progress bar.0
java.util.Calendar getProgressETA()
null
Copyright © 2010 - 2020 Adobe. All Rights Reserved