public class JobDispatcher extends Object
Constructor and Description |
---|
JobDispatcher(JMSConnection jmsConnection,
HarvestDefinitionDAO hDao,
JobDAO jobDao) |
Modifier and Type | Method and Description |
---|---|
void |
doOneCrawl(Job job,
String origHarvestName,
String origHarvestDesc,
String origHarvestSchedule,
HarvestChannel channel,
String origHarvestAudience,
List<MetadataEntry> metadata)
Submit an doOneCrawl request to a HarvestControllerServer.
|
protected void |
submitNextNewJob(HarvestChannel channel)
Submit the next new job (the one with the lowest ID) with the given priority, and updates the internal counter as
needed.
|
public JobDispatcher(JMSConnection jmsConnection, HarvestDefinitionDAO hDao, JobDAO jobDao)
jmsConnection
- The JMS connection to use.hDao
- The HarvestDefinitionDAO to use.protected void submitNextNewJob(HarvestChannel channel)
channel
- the Channel to use for the job.public void doOneCrawl(Job job, String origHarvestName, String origHarvestDesc, String origHarvestSchedule, HarvestChannel channel, String origHarvestAudience, List<MetadataEntry> metadata) throws ArgumentNotValid, IOFailure
job
- the specific job to sendorigHarvestName
- the harvest definition's nameorigHarvestDesc
- the harvest definition's descriptionorigHarvestSchedule
- the harvest definition schedule namechannel
- the channel to which the job should be sentmetadata
- pre-harvest metadata to store in (w)arcfile.origHarvestAudience
- the audience for the data generated by harvest definitions.ArgumentNotValid
- one of the parameters are nullIOFailure
- if unable to send the doOneCrawl request to a harvestControllerServerCopyright © 2005–2015 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.