org.ops4j.pax.radman.service.job.scheduler
Interface JobSchedulerService


public interface JobSchedulerService

JobSchedulerService provides job execution to be scheduled. TODO Add additional methods in this interface

Since:
0.1.0
Author:
Edward Yakop, Gavin Bong

Method Summary
 java.util.List<JobDescriptor> getScheduledJobs()
          Returns all scheduled jobs that are still in this JobSchedulerService instance.
 void removeScheduledJob(java.lang.String jobId)
          Remove the job scheduled with the specified jobId argument.
 void scheduleJob(JobDescriptor descriptor)
          Schedule the job specified in the descriptor.
 

Method Detail

scheduleJob

void scheduleJob(JobDescriptor descriptor)
                 throws java.lang.IllegalArgumentException,
                        JobSchedulerException
Schedule the job specified in the descriptor.

Parameters:
descriptor - The descriptor. This argument must not be null.
Throws:
java.lang.IllegalArgumentException - Thrown if the specified descriptor is null.
JobIdDuplicateException - Thrown if the job with the descriptor's job id is already scheduled.
JobServiceNotFoundException - Thrown if the job service specified by descriptor argument is not available.
JobSchedulerException
Since:
0.1.0

getScheduledJobs

java.util.List<JobDescriptor> getScheduledJobs()
                                               throws JobSchedulerException
Returns all scheduled jobs that are still in this JobSchedulerService instance. Returns an empty list if there is none.

Returns:
All scheduled jobs that are still in this JobSchedulerService instance.
Throws:
JobSchedulerException - Thrown if retrieval fails.
Since:
0.1.0

removeScheduledJob

void removeScheduledJob(java.lang.String jobId)
                        throws java.lang.IllegalArgumentException,
                               JobRemovalFailedException
Remove the job scheduled with the specified jobId argument.

Parameters:
jobId - The job id to be removed. This argument must not be null.
Throws:
java.lang.IllegalArgumentException - Thrown if the specified jobId is null.
JobRemovalFailedException - Thrown if removal of the specified jobId failed.
Since:
0.1.0


Copyright © 2008. All Rights Reserved.