dk.netarkivet.harvester.harvesting.distribute
Class HarvesterRegistrationResponse

java.lang.Object
  extended by dk.netarkivet.common.distribute.NetarkivetMessage
      extended by dk.netarkivet.harvester.distribute.HarvesterMessage
          extended by dk.netarkivet.harvester.harvesting.distribute.HarvesterRegistrationResponse
All Implemented Interfaces:
java.io.Serializable

public class HarvesterRegistrationResponse
extends HarvesterMessage

Message sent by the HarvesterStatusReceiver after processing a HarvesterRegistrationRequest message. It notifies crawlers whether a given harvest channel effectively matches a HarvestChannel defined in the harvest database.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class dk.netarkivet.common.distribute.NetarkivetMessage
replyOfId
 
Constructor Summary
HarvesterRegistrationResponse(java.lang.String harvestChannelName, boolean isValid, boolean isSnapshot)
          Constructor from fields.
 
Method Summary
 void accept(HarvesterMessageVisitor v)
          Should be implemented as a part of the visitor pattern.
 java.lang.String getHarvestChannelName()
           
 boolean isSnapshot()
           
 boolean isValid()
           
 
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

HarvesterRegistrationResponse

public HarvesterRegistrationResponse(java.lang.String harvestChannelName,
                                     boolean isValid,
                                     boolean isSnapshot)
Constructor from fields.

Parameters:
harvestChannelName - the harvest channel name
isValid - whether the given name denotes an existing channel
isSnapshot - true if the channel accepts snapshot harvest, false for partial.
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

getHarvestChannelName

public final java.lang.String getHarvestChannelName()
Returns:
the harvestChannelName

isValid

public final boolean isValid()
Returns:
the isValid

isSnapshot

public final boolean isSnapshot()
Returns:
the isSnapshot