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 in_receiver, BitarchiveServer in_baServer)
          Constructs a HearBeatSender that sends heartbeats.
 
Method Summary
 void run()
          This is the run method of the thread sending heartbeats.
 
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HeartBeatSender

public HeartBeatSender(ChannelID in_receiver,
                       BitarchiveServer in_baServer)
                throws ArgumentNotValid,
                       IOFailure
Constructs a HearBeatSender that sends heartbeats.

Parameters:
in_receiver - - the receiver to receive the heartbeats
in_baServer - - 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