Class FaultyHarvestControllerServer

  • All Implemented Interfaces:
    CleanupIF, HarvesterMessageVisitor, javax.jms.MessageListener

    public class FaultyHarvestControllerServer
    extends HarvesterMessageHandler
    implements CleanupIF
    This class responds to JMS doOneCrawl messages from the HarvestScheduler and waits 10 minutes before failing the job.

    Initially, it registers its channel with the Scheduler by sending a HarvesterRegistrationRequest and waits for a positive HarvesterRegistrationResponse that its channel is recognized. If not recognized by the Scheduler, the HarvestControllerServer will send a notification about this, and then close down the application. During its operation CrawlStatus messages are sent to the HarvestSchedulerMonitorServer. When responding to the message, it sends a message with status 'STARTED'. When 10 minutes have passed, a message is sent with status 'FAILED'.

    Before the 10 minutes starts, the JMS listener is removed to avoid handling more than one doOneCrawlMessage at a time During the 10 minutes, it will send two (instead of one) HarvesterReadyMessages to the scheduler to test issue NAS-2614. The interval between sending HarvesterReadyMessages is defined by the setting 'settings.harvester.harvesting.sendReadyDelay'.