com.wiley.posa3.coordinator
Class SWCoordinator

java.lang.Object
  extended bycom.wiley.posa3.coordinator.SWCoordinator
All Implemented Interfaces:
Coordinator

public class SWCoordinator
extends java.lang.Object
implements Coordinator

SWCoordinator implements the Coordinator interface and ensures that software updates involving multiple participants takes place.

Version:
1.0
Author:
Michael Kircher, Prashant Jain

Constructor Summary
SWCoordinator()
           
 
Method Summary
 void beginTask()
          The beginTask() method is used by the client to define the beginning of a task.
 boolean commitTask()
          The commitTask() method is executed by the client once all the participants have registered.
 void register(Coordination participant)
          The register() method is used by the software download participants to register themselves with the SWCoordinator once a task has begun.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SWCoordinator

public SWCoordinator()
Method Detail

register

public void register(Coordination participant)
The register() method is used by the software download participants to register themselves with the SWCoordinator once a task has begun.

Specified by:
register in interface Coordinator
Parameters:
participant - the software download participant that needs to be registered and whose task needs to be coordinated

beginTask

public void beginTask()
The beginTask() method is used by the client to define the beginning of a task. At this point the SWCoordinator does not do anything.

Specified by:
beginTask in interface Coordinator

commitTask

public boolean commitTask()
The commitTask() method is executed by the client once all the participants have registered. This serves as an indicator of two things to the SWCoordinator: Firstly, that all participants of the task have registered, and secondly, that the coordinator can begin coordinating the execution of the task by the participants. The coordinator now uses the two-phase commit protocol defined by Coordination interface to ensure that the participants complete the task.

Specified by:
commitTask in interface Coordinator
Returns:
boolean the result of committing the task


Copyright 2004 John Wiley and Sons. All Rights Reserved.