public class SimpleMediatorBasedProtocol extends MediatorProtocol
Mediator proposes an offer Agents vote accept/reject Mediator Informs parties of result
Constructor and Description |
---|
SimpleMediatorBasedProtocol() |
Modifier and Type | Method and Description |
---|---|
java.util.Map<NegotiationParty,java.util.List<NegotiationParty>> |
getActionListeners(java.util.List<NegotiationParty> parties)
Get a map of parties that are listening to each other's response
|
Bid |
getCurrentAgreement(Session session,
java.util.List<NegotiationParty> parties)
Returns the last offer for voting as the current agreement.
|
Round |
getRoundStructure(java.util.List<NegotiationParty> parties,
Session session)
Get the structure of the current round.
|
getMediator, getNonMediators
afterSession, applyAction, beforeSession, exclude, getNumberOfAgreeingParties, includeOnly, isFinished
public Round getRoundStructure(java.util.List<NegotiationParty> parties, Session session)
NegotiationParty
and the complete .Session
which
can be used to diversify the round structure at some point during the session.getRoundStructure
in interface Protocol
getRoundStructure
in class ProtocolAdapter
parties
- The parties currently participatingsession
- The complete session historypublic java.util.Map<NegotiationParty,java.util.List<NegotiationParty>> getActionListeners(java.util.List<NegotiationParty> parties)
getActionListeners
in interface Protocol
getActionListeners
in class ProtocolAdapter
parties
- The parties to listen toNegotiationParty
that is responding to a
NegotiationParty.chooseAction(List)
event, and the value is a list of
NegotiationParty
that are listening to that key party's response.public Bid getCurrentAgreement(Session session, java.util.List<NegotiationParty> parties)
RandomFlippingMediator
,
then we return the last accepted bid of that mediatorgetCurrentAgreement
in interface Protocol
getCurrentAgreement
in class ProtocolAdapter
session
- The complete session history up to this pointparties
- The parties involved in the current negotiation