public class SimpleMediatorBasedProtocol extends MediatorProtocol
Mediator proposes an offer Agents vote accept/reject Mediator Informs parties of result
isAborted
Constructor and Description |
---|
SimpleMediatorBasedProtocol() |
Modifier and Type | Method and Description |
---|---|
java.util.Map<NegotiationPartyInternal,java.util.List<NegotiationPartyInternal>> |
getActionListeners(java.util.List<NegotiationPartyInternal> parties)
Get a map of parties that are listening to each other's response
|
Bid |
getCurrentAgreement(Session session,
java.util.List<NegotiationPartyInternal> parties)
Returns the last offer for voting as the current agreement.
|
Round |
getRoundStructure(java.util.List<NegotiationPartyInternal> parties,
Session session)
Get the structure of the current round.
|
getMediator, getNonMediators
afterSession, applyAction, beforeSession, endNegotiation, endNegotiation, exclude, getExecutor, getNumberOfAgreeingParties, includeOnly, isFinished, setExecutor
public Round getRoundStructure(java.util.List<NegotiationPartyInternal> 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 MultilateralProtocol
getRoundStructure
in class MultilateralProtocolAdapter
parties
- The parties currently participatingsession
- The complete session historypublic java.util.Map<NegotiationPartyInternal,java.util.List<NegotiationPartyInternal>> getActionListeners(java.util.List<NegotiationPartyInternal> parties)
getActionListeners
in interface MultilateralProtocol
getActionListeners
in class MultilateralProtocolAdapter
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<NegotiationPartyInternal> parties)
RandomFlippingMediator
, then we
return the last accepted bid of that mediatorgetCurrentAgreement
in interface MultilateralProtocol
getCurrentAgreement
in class MultilateralProtocolAdapter
session
- The complete session history up to this pointparties
- The parties involved in the current negotiation