public class HarvesterStatusReceiver extends HarvesterMessageHandler implements ComponentLifeCycle
visit(HarvesterReadyMessage)
method when a Ready message is received.Constructor and Description |
---|
HarvesterStatusReceiver(JobDispatcher jobDispatcher,
JMSConnection jmsConnection,
HarvestChannelDAO harvestChannelDao,
HarvestChannelRegistry harvestChannelRegistry) |
Modifier and Type | Method and Description |
---|---|
void |
shutdown()
The inverse of the
start() method. |
void |
start()
Implements functionality for starting an instances of this
ComponentLifeCycle object. |
void |
visit(HarvesterReadyMessage message)
Tells the dispatcher that it may dispatch a new job.
|
void |
visit(HarvesterRegistrationRequest msg)
This method should be overridden and implemented by a sub class if message handling is wanted.
|
public HarvesterStatusReceiver(JobDispatcher jobDispatcher, JMSConnection jmsConnection, HarvestChannelDAO harvestChannelDao, HarvestChannelRegistry harvestChannelRegistry)
jobDispatcher
- The JobDispatcher
to delegate the dispatching of new jobs to, when a 'Ready for
job' event is received.jmsConnection
- The JMS connection by which HarvesterReadyMessage
is received.public void start()
ComponentLifeCycle
ComponentLifeCycle
object. This may be
loading files, establish connections, initializing data, starting threads, etc.start
in interface ComponentLifeCycle
public void shutdown()
ComponentLifeCycle
start()
method. Contains functionality for deallocation of ressources, clearing
data, closing connections, stopping threads, etcshutdown
in interface ComponentLifeCycle
public void visit(HarvesterReadyMessage message)
visit
in interface HarvesterMessageVisitor
visit
in class HarvesterMessageHandler
message
- The message containing the relevant harvester information.public void visit(HarvesterRegistrationRequest msg)
HarvesterMessageHandler
visit
in interface HarvesterMessageVisitor
visit
in class HarvesterMessageHandler
msg
- a HarvesterRegistrationRequest
Copyright © 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.