edu.UCL.xmiddle.lib.reconciliation
Class ReconciliationHandler

java.lang.Object
  |
  +--edu.UCL.xmiddle.lib.reconciliation.ReconciliationHandler
All Implemented Interfaces:
HostListener

public class ReconciliationHandler
extends java.lang.Object
implements HostListener

ReconciliationHandler.java The Manager's handler for tree reconciliation. This can occur under two sets of circumstances: Firstly, automatic reconciliation, when the LocalHost triggers this class via the HostListener interface. It is the Manager's responsibility to register this class with the LocalHost. Secondly, online reconciliation, when the Manager must start the reconcilation manually.


Constructor Summary
ReconciliationHandler(Manager manager, LocalHost localhost)
           
 
Method Summary
static ReconciliationHandler getInstance()
           
 void hostInReach(Host host)
          This method is called when a host comes in reach.
 void hostOutOfReach(Host host)
          This method is called when a host goes out of reach.
 void startReconciliation(Host host)
          Triggers the reconciliation protocol.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReconciliationHandler

public ReconciliationHandler(Manager manager,
                             LocalHost localhost)
Method Detail

hostInReach

public void hostInReach(Host host)
This method is called when a host comes in reach. It should be called only by the LocalHost's automatic listener methods.

Specified by:
hostInReach in interface HostListener
Parameters:
host - The host coming in reach.

hostOutOfReach

public void hostOutOfReach(Host host)
This method is called when a host goes out of reach. It should be called only by the LocalHost's automatic listener methods.

Specified by:
hostOutOfReach in interface HostListener
Parameters:
host - The host going out of reach.

startReconciliation

public void startReconciliation(Host host)
Triggers the reconciliation protocol.

Parameters:
host - The host with whom to reconcile.

getInstance

public static ReconciliationHandler getInstance()