dk.netarkivet.archive.bitarchive.distribute
Class HeartBeatSender

java.lang.Object
  extended by java.util.TimerTask
      extended by 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
HeartBeatSender(ChannelID inReceiver, BitarchiveServer inBaServer)
          Constructs a HearBeatSender that sends heartbeats.
 
Method Summary
 void run()
          This is the run method of the thread sending heartbeats.
 java.lang.String toString()
          Retrieval of a string representation of this instance.
 
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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 heartbeats
inBaServer - - the BitarchiveServer of this HeartBeatSender
Throws:
ArgumentNotValid - - if in_baServer is null
IOFailure - - 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 interface java.lang.Runnable
Specified by:
run in class java.util.TimerTask

toString

public java.lang.String toString()
Retrieval of a string representation of this instance.

Overrides:
toString in class java.lang.Object
Returns:
The string representation of this instance.