fr.lifl.magique.policy
Interface ConcurrencyPolicy

All Known Implementing Classes:
DefaultConcurrencyPolicy, RandomConcurrencyPolicy

public interface ConcurrencyPolicy

interface for policy of concurrency, you must defined when an answer is considered to have been received and which answer must be selected among all those received


Method Summary
 boolean isAnswerReceived(AnswerVector theAnswers)
          returns true if the asnwer can be considered as being received according to the content of theAnswers
 Answer selectAnswer(AnswerVector theAnswers)
          select the answer to be considered as THE answer among all the received answers
 

Method Detail

selectAnswer

public Answer selectAnswer(AnswerVector theAnswers)
select the answer to be considered as THE answer among all the received answers

Returns:
THE slected answer
See Also:
Answer

isAnswerReceived

public boolean isAnswerReceived(AnswerVector theAnswers)
returns true if the asnwer can be considered as being received according to the content of theAnswers

Returns:
true if at least one answer has been received
See Also:
Answer