com.norconex.jef
Class AsyncJobGroup

java.lang.Object
  extended by com.norconex.jef.AbstractJobGroup
      extended by com.norconex.jef.AsyncJobGroup
All Implemented Interfaces:
IJob, IJobGroup
Direct Known Subclasses:
AsyncLimitedJobGroup

public class AsyncJobGroup
extends AbstractJobGroup

Job responsible for running a group of jobs asynchronously. All jobs are started at the same time, in different threads. The progress of this group reflects the average progress of all its jobs. This job group is considered completed and will only return when all its jobs are done executing. An exception in one job will not stop the other jobs in the group from running. On the other hand, one or more exception will result in this group to fail.

Author:
Pascal Essiembre

Constructor Summary
AsyncJobGroup(String id, IJob... jobs)
          Constructor.
AsyncJobGroup(String id, String description, IJob... jobs)
          Constructor.
 
Method Summary
 void execute(JobProgress progress, JobSuite suite)
          Executes this job.
 
Methods inherited from class com.norconex.jef.AbstractJobGroup
createJobContext, getId, getJobs, registerGroupProgressMonitoring, stop, unregisterGroupProgressMonitoring
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncJobGroup

public AsyncJobGroup(String id,
                     IJob... jobs)
Constructor.

Parameters:
id - unique identifier for this job group
jobs - jobs making up this group

AsyncJobGroup

public AsyncJobGroup(String id,
                     String description,
                     IJob... jobs)
Constructor.

Parameters:
id - unique identifier for this job group
jobs - jobs making up this group
description - job description
Method Detail

execute

public void execute(JobProgress progress,
                    JobSuite suite)
Description copied from interface: IJob
Executes this job. Implementors are responsible for updating execution progress on the given JobProgress.

Parameters:
progress - current job progress
suite - job suite this job is part of


Copyright © 2007-2013 Norconex Inc.. All Rights Reserved.