Class HeartBeatSender

  • All Implemented Interfaces:
    Runnable

    public class HeartBeatSender
    extends TimerTask
    Thread reponsible for sending out periodic HeartBeatMessages. The BitarchiveServer is closed down if any error occurs whilst sending heartbeats.
    • 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 Runnable
        Specified by:
        run in class TimerTask
      • toString

        public String toString()
        Retrieval of a string representation of this instance.
        Overrides:
        toString in class Object
        Returns:
        The string representation of this instance.