|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.sling.event.jobs.JobUtil
public abstract class JobUtil
The Job
class is an utility class for
creating and processing jobs.
Nested Class Summary | |
---|---|
static class |
JobUtil.JobPriority
The priority for jobs. |
Field Summary | |
---|---|
static String |
JOB_ID
Deprecated. - Use the new Job interface instead. |
static String |
NOTIFICATION_PROPERTY_JOB_ID
Property containing the unique job ID. |
static String |
NOTIFICATION_PROPERTY_JOB_NAME
Property containing the optional job name. |
static String |
NOTIFICATION_PROPERTY_JOB_TOPIC
Property containing the job topic. |
static String |
PROPERTY_JOB_APPLICATION
Deprecated. - Use the new Job interface instead. |
static String |
PROPERTY_JOB_CREATED
Deprecated. - Use the new Job interface instead. |
static String |
PROPERTY_JOB_CREATED_APPLICATION
Deprecated. - Use the new Job interface instead. |
static String |
PROPERTY_JOB_NAME
Deprecated. - Jobs should be started via JobManager.addJob(String, String, java.util.Map) |
static String |
PROPERTY_JOB_PARALLEL
Deprecated. |
static String |
PROPERTY_JOB_PRIORITY
Deprecated. - Use the new Job interface instead. |
static String |
PROPERTY_JOB_QUEUE_NAME
Deprecated. - Use the new Job interface instead. |
static String |
PROPERTY_JOB_QUEUE_ORDERED
Deprecated. |
static String |
PROPERTY_JOB_RETRIES
Deprecated. - Use the new Job interface instead. |
static String |
PROPERTY_JOB_RETRY_COUNT
Deprecated. - Use the new Job interface instead. |
static String |
PROPERTY_JOB_RETRY_DELAY
Deprecated. - Use the new Job interface instead. |
static String |
PROPERTY_JOB_RUN_LOCAL
Deprecated. |
static String |
PROPERTY_JOB_TOPIC
Deprecated. - Jobs should be started via JobManager.addJob(String, String, java.util.Map) |
static String |
PROPERTY_NOTIFICATION_JOB
Deprecated. |
static String |
TOPIC_JOB
Deprecated. - Use the new JobManager.addJob(String, String, java.util.Map) method instead. |
static String |
TOPIC_JOB_CANCELLED
A synchronous notification event when a job is cancelled. |
static String |
TOPIC_JOB_FAILED
Asynchronous notification event when a job failed. |
static String |
TOPIC_JOB_FINISHED
Asynchronous notification event when a job is finished. |
static String |
TOPIC_JOB_STARTED
Asynchronous notification event when a job is started. |
Method Summary | |
---|---|
static boolean |
acknowledgeJob(org.osgi.service.event.Event job)
Deprecated. - Use the new JobConsumer interface instead. |
static void |
finishedJob(org.osgi.service.event.Event job)
Deprecated. - Use the new JobConsumer interface instead. |
static Calendar |
getJobCreated(org.osgi.service.event.Event job)
Deprecated. - Use the new Job interface instead. |
static boolean |
isJobEvent(org.osgi.service.event.Event event)
Deprecated. - Use the new Job interface instead. |
static void |
processJob(org.osgi.service.event.Event job,
JobProcessor processor)
Deprecated. - Use the new JobConsumer interface instead. |
static boolean |
rescheduleJob(org.osgi.service.event.Event job)
Deprecated. - Use the new JobConsumer interface instead. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@Deprecated public static final String PROPERTY_JOB_TOPIC
JobManager.addJob(String, String, java.util.Map)
@Deprecated public static final String PROPERTY_JOB_NAME
JobManager.addJob(String, String, java.util.Map)
@Deprecated public static final String PROPERTY_JOB_PARALLEL
@Deprecated public static final String PROPERTY_JOB_RUN_LOCAL
@Deprecated public static final String PROPERTY_JOB_RETRY_COUNT
Job
interface instead.
@Deprecated public static final String PROPERTY_JOB_RETRIES
Job
interface instead.
@Deprecated public static final String PROPERTY_JOB_RETRY_DELAY
Job
interface instead.
@Deprecated public static final String PROPERTY_JOB_QUEUE_NAME
Job
interface instead.
@Deprecated public static final String PROPERTY_JOB_QUEUE_ORDERED
@Deprecated public static final String PROPERTY_JOB_PRIORITY
Job
interface instead.processJob(Event, JobProcessor)
method.
If another way of executing the job is used, it is up to the processor to ensure
the job priority is taken into account.
For possible values see JobUtil.JobPriority
.
If this property is set by the client creating the job it's value is ignored
@Deprecated public static final String PROPERTY_JOB_CREATED
Job
interface instead.
@Deprecated public static final String PROPERTY_JOB_CREATED_APPLICATION
Job
interface instead.
@Deprecated public static final String PROPERTY_JOB_APPLICATION
Job
interface instead.
@Deprecated public static final String TOPIC_JOB
JobManager.addJob(String, String, java.util.Map)
method instead.
@Deprecated public static final String JOB_ID
Job
interface instead.
public static final String TOPIC_JOB_STARTED
NOTIFICATION_PROPERTY_JOB_TOPIC
contains the job topic,
the property NOTIFICATION_PROPERTY_JOB_NAME
might contain the job name,
and the property NOTIFICATION_PROPERTY_JOB_ID
contains the unique job id.
The time stamp of the event (as a Long) is available from the property
EventConstants.TIMESTAMP
.
The payload of the job is available as additional job specific properties.
public static final String TOPIC_JOB_FINISHED
NOTIFICATION_PROPERTY_JOB_TOPIC
contains the job topic,
the property NOTIFICATION_PROPERTY_JOB_NAME
might contain the job name,
and the property NOTIFICATION_PROPERTY_JOB_ID
contains the unique job id.
The time stamp of the event (as a Long) is available from the property
EventConstants.TIMESTAMP
.
The payload of the job is available as additional job specific properties.
public static final String TOPIC_JOB_FAILED
NOTIFICATION_PROPERTY_JOB_TOPIC
contains the job topic,
the property NOTIFICATION_PROPERTY_JOB_NAME
might contain the job name,
and the property NOTIFICATION_PROPERTY_JOB_ID
contains the unique job id.
The time stamp of the event (as a Long) is available from the property
EventConstants.TIMESTAMP
.
The payload of the job is available as additional job specific properties.
public static final String TOPIC_JOB_CANCELLED
NOTIFICATION_PROPERTY_JOB_TOPIC
contains the job topic,
the property NOTIFICATION_PROPERTY_JOB_NAME
might contain the job name,
and the property NOTIFICATION_PROPERTY_JOB_ID
contains the unique job id.
The time stamp of the event (as a Long) is available from the property
EventConstants.TIMESTAMP
.
The payload of the job is available as additional job specific properties.
@Deprecated public static final String PROPERTY_NOTIFICATION_JOB
public static final String NOTIFICATION_PROPERTY_JOB_TOPIC
Job.getTopic()
,
Constant Field Valuespublic static final String NOTIFICATION_PROPERTY_JOB_NAME
Job.getName()
,
Constant Field Valuespublic static final String NOTIFICATION_PROPERTY_JOB_ID
Job.getId()
,
Constant Field ValuesMethod Detail |
---|
@Deprecated public static boolean isJobEvent(org.osgi.service.event.Event event)
Job
interface instead.
PROPERTY_JOB_TOPIC
property.
event
- The event to check.
true>
if this is a job event.@Deprecated public static boolean acknowledgeJob(org.osgi.service.event.Event job)
JobConsumer
interface instead.
false
this means someone else is already
processing this job, and the caller should not process the event anymore.
true
if the acknowledge could be sent
IllegalArgumentException
- If the event is a job event but does not have a notifier context.@Deprecated public static void finishedJob(org.osgi.service.event.Event job)
JobConsumer
interface instead.
IllegalArgumentException
- If the event is a job event but does not have a notifier context.@Deprecated public static boolean rescheduleJob(org.osgi.service.event.Event job)
JobConsumer
interface instead.
true
if the job has been rescheduled, false
otherwise.
IllegalArgumentException
- If the event is a job event but does not have a notifier context.@Deprecated public static void processJob(org.osgi.service.event.Event job, JobProcessor processor)
JobConsumer
interface instead.
IllegalArgumentException
- If the event is a job event but does not have a notifier context.@Deprecated public static Calendar getJobCreated(org.osgi.service.event.Event job)
Job
interface instead.
job
- The job event
null
if this is not a job event.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |