Class HeartBeatSender
- java.lang.Object
-
- java.util.TimerTask
-
- dk.netarkivet.archive.bitarchive.distribute.HeartBeatSender
-
- All Implemented Interfaces:
java.lang.Runnable
public class HeartBeatSender extends java.util.TimerTask
Thread reponsible for sending out periodic HeartBeatMessages. The BitarchiveServer is closed down if any error occurs whilst sending heartbeats.
-
-
Constructor Summary
Constructors Constructor Description HeartBeatSender(ChannelID inReceiver, BitarchiveServer inBaServer)
Constructs a HearBeatSender that sends heartbeats.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
run()
This is the run method of the thread sending heartbeats.java.lang.String
toString()
Retrieval of a string representation of this instance.
-
-
-
Constructor Detail
-
HeartBeatSender
public HeartBeatSender(ChannelID inReceiver, BitarchiveServer inBaServer) throws ArgumentNotValid, IOFailure
Constructs a HearBeatSender that sends heartbeats.- Parameters:
inReceiver
- - the receiver to receive the heartbeatsinBaServer
- - the BitarchiveServer of this HeartBeatSender- Throws:
ArgumentNotValid
- - if in_baServer is nullIOFailure
- - if getting an JMSConnection instance fails
-
-
Method Detail
-
run
public void run()
This is the run method of the thread sending heartbeats. The BitarchiveServer is closed down if any error occurs.- Specified by:
run
in interfacejava.lang.Runnable
- Specified by:
run
in classjava.util.TimerTask
-
toString
public java.lang.String toString()
Retrieval of a string representation of this instance.- Overrides:
toString
in classjava.lang.Object
- Returns:
- The string representation of this instance.
-
-