public class SessionManager
extends java.lang.Object
SessionManager
is responsible for enforcing the Protocol
during the
Session
. This is the entry point for the negotiation algorithm. The protocol and session
parameters are passed on from the GUI.Constructor and Description |
---|
SessionManager(java.util.List<NegotiationParty> parties,
Protocol protocol,
Session session)
Initializes a new instance of the
SessionManager object. |
Modifier and Type | Method and Description |
---|---|
void |
addLoggingListener(MultipartyNegotiationEventListener eventListener)
Adds a listener to the logging events.
|
java.util.ArrayList<java.util.ArrayList<java.lang.Double[]>> |
getAgentUtils()
Get the history of the utilities for all agents so far.
|
double[][] |
getAgreementUtilities()
Returns round number and utility value of agreement if any.
|
void |
run()
Start the negotiation session
TODO David: This method has become huge, needs to be refactored.
|
public SessionManager(java.util.List<NegotiationParty> parties, Protocol protocol, Session session)
SessionManager
object. After initialization this
SessionManager
can be run()
.parties
- The parties to use in this session (including agents and optionally mediators)protocol
- The protocol to use for this session.session
- A session object containing preset information (can also be a new instance)public void run() throws InvalidActionError
InvalidActionError
public void addLoggingListener(MultipartyNegotiationEventListener eventListener)
eventListener
- The instance listening to logging eventspublic java.util.ArrayList<java.util.ArrayList<java.lang.Double[]>> getAgentUtils()
public double[][] getAgreementUtilities()