public class SessionManager extends DefaultListenable<NegotiationEvent> implements java.lang.Runnable
SessionManager
is responsible for enforcing the
MultilateralProtocol
during the Session
. This is the entry
point for the negotiation algorithm. The protocol and session parameters are
passed on from the GUI.
This logs all events to the Listener
. You need to subscribe to hear
the log events, eg for display or for writing to file.Constructor and Description |
---|
SessionManager(java.util.List<NegotiationPartyInternal> theparties,
Session session,
ExecutorWithTimeout exec)
Initializes a new instance of the
SessionManager object. |
Modifier and Type | Method and Description |
---|---|
void |
run()
Run and wait for completion.
|
void |
runAndWait()
Runs the negotiation session and wait for it to complete.
|
addListener, notifyChange, removeListener
public SessionManager(java.util.List<NegotiationPartyInternal> theparties, Session session, ExecutorWithTimeout exec)
SessionManager
object. After
initialization this SessionManager
can be run()
.theparties
- The parties to use in this session (including agents and
optionally mediators)session
- A session object containing preset information (can also be a
new instance)exec
- the executor to use when runningpublic void run()
RuntimeException
because
run()
doesn't allow throwing checked exceptions.run
in interface java.lang.Runnable
public void runAndWait() throws ActionException, java.lang.InterruptedException, java.util.concurrent.ExecutionException, NegotiationPartyTimeoutException
NegotiationPartyTimeoutException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
ActionException