public class MediatorFeedbackProtocol extends MediatorProtocol
Mediator proposes an offer Agents give feedback Mediator Informs parties of result
isAborted
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<NegotiationPartyInternal> parties)
Before each session we'd like to inform the mediator of the number of
parties
|
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 most recent agreement found by the mediator.
|
Round |
getRoundStructure(java.util.List<NegotiationPartyInternal> parties,
Session session)
Get the structure of the current round.
|
boolean |
isFinished(Session session,
java.util.List<NegotiationPartyInternal> parties)
Check if the protocol is done or still busy.
|
getMediator, getNonMediators
afterSession, endNegotiation, endNegotiation, exclude, getExecutor, getNumberOfAgreeingParties, includeOnly, 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 void applyAction(Action action, Session session)
applyAction
in interface MultilateralProtocol
applyAction
in class MultilateralProtocolAdapter
action
- action to applysession
- the current state of this sessionpublic void beforeSession(Session session, java.util.List<NegotiationPartyInternal> parties)
beforeSession
in interface MultilateralProtocol
beforeSession
in class MultilateralProtocolAdapter
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<NegotiationPartyInternal> parties)
FeedbackMediator
getCurrentAgreement
in interface MultilateralProtocol
getCurrentAgreement
in class MultilateralProtocolAdapter
session
- The complete session history up to this pointparties
- The parties involved in the current negotiationpublic boolean isFinished(Session session, java.util.List<NegotiationPartyInternal> 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 MultilateralProtocol
isFinished
in class MultilateralProtocolAdapter
session
- the current state of this sessionpublic 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 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.