dk.netarkivet.archive.bitarchive.distribute
Class HeartBeatMessage
java.lang.Object
dk.netarkivet.common.distribute.NetarkivetMessage
dk.netarkivet.archive.distribute.ArchiveMessage
dk.netarkivet.archive.bitarchive.distribute.HeartBeatMessage
- All Implemented Interfaces:
- java.io.Serializable
public class HeartBeatMessage
- extends ArchiveMessage
Simple class representing a HeartBeat message from a bit archive application.
A heartbeat has an applicationId, that identifies the application
that generated the heartbeat.
TODO This class should probably contain more status data from
bit archive application later.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
HeartBeatMessage
public HeartBeatMessage(ChannelID inReceiver,
java.lang.String applicationId)
- Creates a heartbeat message.
The time of the heartbeat is set to the creation of this object.
- Parameters:
inReceiver
- ChannelID for the recipient of this message.applicationId
- - id of the application that sent the heartbeat
getTimestamp
public long getTimestamp()
- Returns:
- time of heartbeat occurrence.
getBitarchiveID
public java.lang.String getBitarchiveID()
- Returns:
- id of the application that generated the heartbeat.
toString
public java.lang.String toString()
- Retrieval of a string representation of this instance.
- Overrides:
toString
in class NetarkivetMessage
- Returns:
- The string representation of this instance.
accept
public void accept(ArchiveMessageVisitor v)
- Should be implemented as a part of the visitor pattern. fx.: public void
accept(ArchiveMessageVisitor v) { v.visit(this); }
- Specified by:
accept
in class ArchiveMessage
- Parameters:
v
- A message visitor- See Also:
ArchiveMessageVisitor