infoservice.agreement.multicast.interfaces
Interface IInfoService

All Known Implementing Classes:
AbstractEMCAdapter, InfoserviceEMCAdapter

public interface IInfoService


Method Summary
 java.lang.String getIdentifier()
          Returns an unique identifier for this IInfoService
 int getNumberOfAllInfoservices()
          Returns the number of known InfoServices
 void handleMessage(IAgreementMessage a_message)
          Handles the incomming IAgreementMessage
 void multicastMessage(IAgreementMessage a_message)
          Multicasts the given message to all known InfoServices (except this one)
 void notifyAgreement(java.lang.Long a_oldCommonRandomSeed, java.lang.Long a_newCommonRandomSeed)
          Callback of the agreement handler.
 void sendMessageTo(java.lang.String a_id, IAgreementMessage a_echoMessage)
          Sends the given message to the InfoService with the given ID
 

Method Detail

getIdentifier

java.lang.String getIdentifier()
Returns an unique identifier for this IInfoService

Returns:
An unique identifier for this IInfoService

handleMessage

void handleMessage(IAgreementMessage a_message)
Handles the incomming IAgreementMessage

Parameters:
a_message -

multicastMessage

void multicastMessage(IAgreementMessage a_message)
Multicasts the given message to all known InfoServices (except this one)

Parameters:
a_message -

sendMessageTo

void sendMessageTo(java.lang.String a_id,
                   IAgreementMessage a_echoMessage)
Sends the given message to the InfoService with the given ID

Parameters:
a_id - The ID of the InfoService
a_echoMessage - The message

notifyAgreement

void notifyAgreement(java.lang.Long a_oldCommonRandomSeed,
                     java.lang.Long a_newCommonRandomSeed)
Callback of the agreement handler. Gets called if an agreement was reached

Parameters:
a_newCommonRandomSeed - The newly agreed upon common random

getNumberOfAllInfoservices

int getNumberOfAllInfoservices()
Returns the number of known InfoServices

Returns:
The number of known InfoServices