Package jadex.bdi.planlib.protocols
Class ICNPHandler
- java.lang.Object
- 
- jadex.bdi.planlib.protocols.ICNPHandler
 
- 
- All Implemented Interfaces:
- IProposalEvaluator,- IQueryNextroundInfo
 
 public class ICNPHandler extends java.lang.Object implements IProposalEvaluator, IQueryNextroundInfo A helper class that handles a receiver side goals of the iterated contract net protocol by delegating to some implementation of the corresponding interface.
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface jadex.bdi.planlib.protocols.IQueryNextroundInfoIQueryNextroundInfo.NextroundInfo
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected IProposalEvaluatorproposal_evaluatorThe proposal evaluator.protected IQueryNextroundInfoquery_nextround_infoThe query nextround info.
 - 
Constructor SummaryConstructors Constructor Description ICNPHandler(IProposalEvaluator proposal_evaluator, IQueryNextroundInfo query_nextround_info)Create an ICNPHandler using the given implementations.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ParticipantProposal[]evaluateProposals(java.lang.Object cfp, java.lang.Object cfp_info, NegotiationRecord[] history, ParticipantProposal[] proposals)Evaluate the given proposals and determine winning proposals.booleanqueryNextroundInfo(IQueryNextroundInfo.NextroundInfo info, NegotiationRecord[] history, ParticipantProposal[] proposals)Collect information for next negotiation round.
 
- 
- 
- 
Field Detail- 
proposal_evaluatorprotected IProposalEvaluator proposal_evaluator The proposal evaluator.
 - 
query_nextround_infoprotected IQueryNextroundInfo query_nextround_info The query nextround info.
 
- 
 - 
Constructor Detail- 
ICNPHandlerpublic ICNPHandler(IProposalEvaluator proposal_evaluator, IQueryNextroundInfo query_nextround_info) Create an ICNPHandler using the given implementations.- Parameters:
- proposal_evaluator- The proposal evaluator.
- query_nextround_info- The query nextround info.
 
 
- 
 - 
Method Detail- 
evaluateProposalspublic ParticipantProposal[] evaluateProposals(java.lang.Object cfp, java.lang.Object cfp_info, NegotiationRecord[] history, ParticipantProposal[] proposals) Evaluate the given proposals and determine winning proposals.- Specified by:
- evaluateProposalsin interface- IProposalEvaluator
- Parameters:
- cfp- The original call-for-proposal object.
- cfp_info- Local meta information associated to the interaction.
- history- The history of negotiation rounds.
- proposals- The received proposals.
- Returns:
- The acceptable proposals, sorted by preference (best proposal first).
 
 - 
queryNextroundInfopublic boolean queryNextroundInfo(IQueryNextroundInfo.NextroundInfo info, NegotiationRecord[] history, ParticipantProposal[] proposals) Collect information for next negotiation round.- Specified by:
- queryNextroundInfoin interface- IQueryNextroundInfo
- Parameters:
- info- The nextround info object, which might be altered.
- history- The history of negotiation rounds.
- proposals- The received proposals.
- Returns:
- True, if another negotiation round should be performed.
 
 
- 
 
-