dk.netarkivet.harvester.harvesting.distribute
Class HarvestControllerClient

java.lang.Object
  extended by dk.netarkivet.harvester.harvesting.distribute.HarvestControllerClient

public class HarvestControllerClient
extends java.lang.Object

Proxy for remote scheduler. Establishes a JMS connection, and gives an interfaces for sending crawl requests.


Field Summary
protected  org.apache.commons.logging.Log log
          the logger to use.
static java.lang.String sendMessage
          A String to write to log when sending a message.
 
Method Summary
 void close()
          Closes client cleanly.
 void doOneCrawl(Job job, java.util.List<MetadataEntry> metadata)
          Submit an doOneCrawl request to a HarvestControllerServer with correct priority.
static HarvestControllerClient getInstance()
          Construction factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sendMessage

public static final java.lang.String sendMessage
A String to write to log when sending a message.

See Also:
Constant Field Values

log

protected final org.apache.commons.logging.Log log
the logger to use.

Method Detail

getInstance

public static HarvestControllerClient getInstance()
                                           throws IOFailure
Construction factory.

Returns:
a HarvesterControllerClient instance.
Throws:
IOFailure - If there is a problem making the connection.

doOneCrawl

public void doOneCrawl(Job job,
                       java.util.List<MetadataEntry> metadata)
                throws ArgumentNotValid,
                       IOFailure
Submit an doOneCrawl request to a HarvestControllerServer with correct priority.

Parameters:
job - the specific job to send
metadata - pre-harvest metadata to store in arcfile.
Throws:
ArgumentNotValid - the job parameter is null
IOFailure - if unable to send the doOneCrawl request to a harvestControllerServer

close

public void close()
Closes client cleanly.