org.archive.hcc.client
Class CrawlerImpl

java.lang.Object
  extended by org.archive.hcc.client.ProxyBase
      extended by org.archive.hcc.client.CrawlerImpl
All Implemented Interfaces:
Crawler, Proxy

public class CrawlerImpl
extends ProxyBase
implements Crawler

Author:
Daniel Bernstein (dbernstein@archive.org)

Field Summary
 
Fields inherited from class org.archive.hcc.client.ProxyBase
connection, name
 
Constructor Summary
CrawlerImpl(javax.management.ObjectName name, javax.management.MBeanServerConnection connection)
           
 
Method Summary
 java.lang.String addJob(JobOrder order)
          Adds a job to the pending job queue.
 boolean deleteCompletedCrawlJob(CompletedCrawlJob job)
          Deletes a job from the completed list.
 boolean deletePendingCrawlJob(PendingCrawlJob job)
          Deletes a job from the pending queue.
 void destroy()
          Destroys the crawler instance and all dependent objects.
(package private)  java.lang.String getCrawlReport(java.lang.Long uid)
           
(package private)  java.lang.String getHostsReport(java.lang.Long uid)
           
(package private)  java.lang.String getMimeTypesReport(java.lang.Long uid)
           
(package private)  java.lang.String getReport(java.lang.String reportName, java.lang.Long uid)
           
(package private)  java.lang.String getSeedsReport(java.lang.Long uid)
           
(package private)  java.lang.String getSourceReport(java.lang.Long uid)
           
 java.lang.String getVersion()
          Returns the Heritrix version.
 boolean isCrawling()
          Returns true if the crawler has a currently running job.
 boolean isPendingJobQueueRunning()
          Returns true if the pending job queue is running.
 java.util.Collection<CompletedCrawlJob> listCompletedCrawlJobs()
          Returns a list of completed jobs.
 java.util.Collection<PendingCrawlJob> listPendingCrawlJobs()
          Returns a list of pending jobs.
 void startPendingJobQueue()
          Starts the pending job queue.
 void stopPendingJobQueue()
          Stops the pending job queue.
 void terminateCurrentJob()
          Terminates the currently running job.
 
Methods inherited from class org.archive.hcc.client.ProxyBase
equals, getName, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.archive.hcc.client.Proxy
getName
 

Constructor Detail

CrawlerImpl

public CrawlerImpl(javax.management.ObjectName name,
                   javax.management.MBeanServerConnection connection)
Method Detail

startPendingJobQueue

public void startPendingJobQueue()
Description copied from interface: Crawler
Starts the pending job queue. Does nothing if the queue is already started.

Specified by:
startPendingJobQueue in interface Crawler

stopPendingJobQueue

public void stopPendingJobQueue()
Description copied from interface: Crawler
Stops the pending job queue. Does nothing if the queue is already stopped.

Specified by:
stopPendingJobQueue in interface Crawler

isCrawling

public boolean isCrawling()
Description copied from interface: Crawler
Returns true if the crawler has a currently running job.

Specified by:
isCrawling in interface Crawler
Returns:

isPendingJobQueueRunning

public boolean isPendingJobQueueRunning()
Description copied from interface: Crawler
Returns true if the pending job queue is running.

Specified by:
isPendingJobQueueRunning in interface Crawler
Returns:

getVersion

public java.lang.String getVersion()
Description copied from interface: Crawler
Returns the Heritrix version.

Specified by:
getVersion in interface Crawler
Returns:

destroy

public void destroy()
Description copied from interface: Crawler
Destroys the crawler instance and all dependent objects.

Specified by:
destroy in interface Crawler

addJob

public java.lang.String addJob(JobOrder order)
Description copied from interface: Crawler
Adds a job to the pending job queue.

Specified by:
addJob in interface Crawler
Returns:

terminateCurrentJob

public void terminateCurrentJob()
Description copied from interface: Crawler
Terminates the currently running job. Does nothing if if no job is currently running.

Specified by:
terminateCurrentJob in interface Crawler

getCrawlReport

java.lang.String getCrawlReport(java.lang.Long uid)
                          throws ClusterException
Throws:
ClusterException

getHostsReport

java.lang.String getHostsReport(java.lang.Long uid)
                          throws ClusterException
Throws:
ClusterException

getSourceReport

java.lang.String getSourceReport(java.lang.Long uid)
                           throws ClusterException
Throws:
ClusterException

getSeedsReport

java.lang.String getSeedsReport(java.lang.Long uid)
                          throws ClusterException
Throws:
ClusterException

getMimeTypesReport

java.lang.String getMimeTypesReport(java.lang.Long uid)
                              throws ClusterException
Throws:
ClusterException

getReport

java.lang.String getReport(java.lang.String reportName,
                           java.lang.Long uid)
                     throws ClusterException
Parameters:
reportName -
uid -
Returns:
Throws:
ClusterException

deleteCompletedCrawlJob

public boolean deleteCompletedCrawlJob(CompletedCrawlJob job)
                                throws ClusterException
Description copied from interface: Crawler
Deletes a job from the completed list.

Specified by:
deleteCompletedCrawlJob in interface Crawler
Returns:
Throws:
ClusterException

deletePendingCrawlJob

public boolean deletePendingCrawlJob(PendingCrawlJob job)
Description copied from interface: Crawler
Deletes a job from the pending queue.

Specified by:
deletePendingCrawlJob in interface Crawler
Returns:

listCompletedCrawlJobs

public java.util.Collection<CompletedCrawlJob> listCompletedCrawlJobs()
Description copied from interface: Crawler
Returns a list of completed jobs.

Specified by:
listCompletedCrawlJobs in interface Crawler
Returns:

listPendingCrawlJobs

public java.util.Collection<PendingCrawlJob> listPendingCrawlJobs()
Description copied from interface: Crawler
Returns a list of pending jobs.

Specified by:
listPendingCrawlJobs in interface Crawler
Returns:


Copyright © 2005-2008 The Internet Archive. All Rights Reserved.