dk.netarkivet.harvester.harvesting.distribute
Class HarvesterStatusMessage

java.lang.Object
  extended by dk.netarkivet.common.distribute.NetarkivetMessage
      extended by dk.netarkivet.harvester.distribute.HarvesterMessage
          extended by 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 HarvesterStatusMessages to the HarvestDispatcher to notify it whether it is available for processing a job or already processing one.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class dk.netarkivet.common.distribute.NetarkivetMessage
replyOfId
 
Constructor Summary
HarvesterStatusMessage(java.lang.String applicationInstanceId, JobPriority jobPriority, boolean isAvailable)
          Builds a new message.
 
Method Summary
 void accept(HarvesterMessageVisitor v)
          Should be implemented as a part of the visitor pattern.
 java.lang.String getApplicationInstanceId()
           
 JobPriority getJobProprity()
           
 boolean isAvailable()
           
 
Methods inherited from class dk.netarkivet.common.distribute.NetarkivetMessage
getErrMsg, getID, getReplyOfId, getReplyTo, getTo, hasBeenSent, isOk, setNotOk, setNotOk, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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.
Method Detail

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.