com.bankframe.ei.txnhandler.storeandforward.impl.forwardtransaction
Class HostStatusMonitor

java.lang.Object
  extended bycom.bankframe.ei.txnhandler.storeandforward.impl.forwardtransaction.HostStatusMonitor
All Implemented Interfaces:
java.lang.Runnable

public class HostStatusMonitor
extends java.lang.Object
implements java.lang.Runnable

This thread class monitors the connection to the host system. It is used with the store class to determine whether request in the store can be released to the host system. Every x seconds the thread will attempt to send a request to the host system. This will only happen if the store is non-empty.


Constructor Summary
HostStatusMonitor()
          HostStatusMonitor constructor.
HostStatusMonitor(int delay)
          HostStatusMonitor constructor.
 
Method Summary
 void run()
          This method will check if the store is empty every x seconds.
 void setDelay(int newDelay)
          This method sets the time that the thread waits between checking this host status
 void start()
          This method starts the monitor thread at the lowest priority
 void stop()
          This method will shut down the thread
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HostStatusMonitor

public HostStatusMonitor()
HostStatusMonitor constructor.


HostStatusMonitor

public HostStatusMonitor(int delay)
HostStatusMonitor constructor.

Method Detail

run

public void run()
This method will check if the store is empty every x seconds. If it is and the host status is currently offline, then try and send a request from the store to the host system. If this requets is successful the set the online attribute of the destination entity corresponding to that host to true.

Specified by:
run in interface java.lang.Runnable

setDelay

public void setDelay(int newDelay)
This method sets the time that the thread waits between checking this host status

Parameters:
newDelay - the new delay time in milliseconds ( must be > 1000)

start

public void start()
This method starts the monitor thread at the lowest priority


stop

public void stop()
This method will shut down the thread



Copyright © 2005, 2007, Oracle. All rights reserved.