infoservice.agreement.multicast.interfaces
Interface IAgreementHandler

All Superinterfaces:
TimeoutListener
All Known Implementing Classes:
EchoMulticastAgreementHandlerImpl

public interface IAgreementHandler
extends TimeoutListener

Author:
LERNGRUPPE Provides a set of methods for achieving an agreement between all infoservices.

Method Summary
 IInfoService getInfoService()
          Gets the infoservice which belongs to this agreement handler.
 void handleMessage(IAgreementMessage a_msg)
          Handles incomming IAgreementMessage.
 void notifyConsensusLogTimeout(IConsensusLog a_log)
          This method will be called if a log entry times out.
 void reset()
          This activates the agreement protocol in passiv mode, whitch means that incomming messages will be handled but we do not start our own InitMessage
 void setLastCommonRandom(java.lang.String a_commonRandom)
          This is needes for testing purposes only.
 void setLog(IAgreementLog a_log)
           
 void startAgreementCommitmentProtocol()
          Starts the agreement protocol.
 
Methods inherited from interface infoservice.agreement.common.TimeoutListener
timeout
 

Method Detail

setLog

void setLog(IAgreementLog a_log)

handleMessage

void handleMessage(IAgreementMessage a_msg)
                   throws java.lang.IllegalArgumentException
Handles incomming IAgreementMessage.

Parameters:
a_msg - The given message.
Throws:
java.lang.IllegalArgumentException

startAgreementCommitmentProtocol

void startAgreementCommitmentProtocol()
Starts the agreement protocol. Call prepareAgreementsStart() befor and wait a minute.


getInfoService

IInfoService getInfoService()
Gets the infoservice which belongs to this agreement handler.

Returns:

notifyConsensusLogTimeout

void notifyConsensusLogTimeout(IConsensusLog a_log)
This method will be called if a log entry times out. It is used for getting status information only.

Parameters:
a_log - The log entry.

setLastCommonRandom

void setLastCommonRandom(java.lang.String a_commonRandom)
This is needes for testing purposes only.

Parameters:
a_commonRandom - The value of the current round number.

reset

void reset()
This activates the agreement protocol in passiv mode, whitch means that incomming messages will be handled but we do not start our own InitMessage