public class MediatorFeedbackProtocol extends MediatorProtocol
Mediator proposes an offer Agents give feedback Mediator Informs parties of result
Constructor and Description |
---|
MediatorFeedbackProtocol() |
Modifier and Type | Method and Description |
---|---|
void |
applyAction(Action action,
Session session)
Apply the action according to the protocol.
|
void |
beforeSession(Session session,
java.util.List<NegotiationParty> parties)
Before each session we'd like to inform the mediator of the number of parties
|
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 most recent agreement found by the mediator.
|
Round |
getRoundStructure(java.util.List<NegotiationParty> parties,
Session session)
Get the structure of the current round.
|
boolean |
isFinished(Session session,
java.util.List<NegotiationParty> parties)
Check if the protocol is done or still busy.
|
getMediator, getNonMediators
afterSession, exclude, getNumberOfAgreeingParties, includeOnly
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 void applyAction(Action action, Session session)
applyAction
in interface Protocol
applyAction
in class ProtocolAdapter
action
- action to applysession
- the current state of this sessionpublic void beforeSession(Session session, java.util.List<NegotiationParty> parties)
beforeSession
in interface Protocol
beforeSession
in class ProtocolAdapter
session
- The session instance that will be used for the sessionparties
- The parties that will participate in the sessionpublic Bid getCurrentAgreement(Session session, java.util.List<NegotiationParty> parties)
FeedbackMediator
getCurrentAgreement
in interface Protocol
getCurrentAgreement
in class ProtocolAdapter
session
- The complete session history up to this pointparties
- The parties involved in the current negotiationpublic boolean isFinished(Session session, java.util.List<NegotiationParty> parties)
SessionManager
will not start a new Round
after the
current one. It will however finish all the turns described in the
getRoundStructure(java.util.List, negotiator.session.Session)
method.isFinished
in interface Protocol
isFinished
in class ProtocolAdapter
session
- the current state of this sessionpublic 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 currently participatingNegotiationParty
that is responding to a
NegotiationParty.chooseAction(java.util.List)
event, and the value is a list of
NegotiationParty
that are listening to that key party's response.