dk.netarkivet.harvester.harvesting.distribute
Class HarvesterStatusMessage
java.lang.Object
dk.netarkivet.common.distribute.NetarkivetMessage
dk.netarkivet.harvester.distribute.HarvesterMessage
dk.netarkivet.harvester.harvesting.distribute.HarvesterStatusMessage
- All Implemented Interfaces:
- java.io.Serializable
public class HarvesterStatusMessage
- extends HarvesterMessage
- implements java.io.Serializable
The HarvestController
periodically sends
HarvesterStatusMessage
s to the HarvestDispatcher
to notify
it whether it is available for processing a job or already processing one.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
HarvesterStatusMessage
public HarvesterStatusMessage(java.lang.String applicationInstanceId,
JobPriority jobPriority,
boolean isAvailable)
- Builds a new message.
- Parameters:
jobPriority
- the priority of jobs crawled by the sender.applicationInstanceId
- the sender's application instance ID.isAvailable
- whether or not the sender is
processing a crawl request.
accept
public void accept(HarvesterMessageVisitor v)
- Description copied from class:
HarvesterMessage
- Should be implemented as a part of the visitor pattern. fx.: public void
accept(HarvesterMessageVisitor v) { v.visit(this); }
- Specified by:
accept
in class HarvesterMessage
- Parameters:
v
- A message visitor
getJobProprity
public JobPriority getJobProprity()
- Returns:
- the priority of jobs crawled by the sender.
getApplicationInstanceId
public java.lang.String getApplicationInstanceId()
- Returns:
- the application instance ID.
isAvailable
public boolean isAvailable()
- Returns:
- the availability.