public class TournamentManager extends java.lang.Thread implements Listenable<NegotiationEvent>
SessionManager are instantiated. It uses the
configuration object which is created by the user interface and extracts
individual session from configuration object which it wil pass on to the
session manager.
Agents in a tournament must be of class NegotiationParty.
| Constructor and Description |
|---|
TournamentManager(MultilateralTournamentConfiguration config)
Initializes a new instance of the
TournamentManager class. |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(Listener<NegotiationEvent> listener)
listener support
|
protected java.lang.Object |
clone() |
static java.util.List<NegotiationPartyInternal> |
getPartyList(ExecutorWithTimeout executor,
MultilateralSessionConfiguration config,
SessionsInfo info,
Session session)
Generate the parties involved in the next round of the tournament
generator.
|
static MultilateralProtocol |
getProtocol(MultiPartyProtocolRepItem protocolRepItem)
Create a new instance of the Protocol object from a
MultiPartyProtocolRepItem |
void |
removeListener(Listener<NegotiationEvent> listener)
Remove listener for this observable
|
void |
run()
Runnable implementation for thread
|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic TournamentManager(MultilateralTournamentConfiguration config) throws java.io.IOException, InstantiateException
TournamentManager class. The tournament
manager uses the provided configuration to find which sessions to run and
how many collections of these sessions (tournaments) to run.config - The configuration to use for this TournamentInstantiateExceptionjava.io.IOExceptionpublic void addListener(Listener<NegotiationEvent> listener)
addListener in interface Listenable<NegotiationEvent>listener - the listener to addpublic void removeListener(Listener<NegotiationEvent> listener)
ListenableremoveListener in interface Listenable<NegotiationEvent>listener - the listener to removepublic void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic static java.util.List<NegotiationPartyInternal> getPartyList(ExecutorWithTimeout executor, MultilateralSessionConfiguration config, SessionsInfo info, Session session) throws java.util.concurrent.TimeoutException, java.util.concurrent.ExecutionException
executor - the executor to useconfig - the MultilateralSessionConfiguration to useinfo - the global SessionsInfo.java.util.concurrent.TimeoutException - if we run out of time during the construction.java.util.concurrent.ExecutionException - if one of the agents does not construct properlyprotected java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Threadjava.lang.CloneNotSupportedExceptionpublic static MultilateralProtocol getProtocol(MultiPartyProtocolRepItem protocolRepItem) throws InstantiateException
MultiPartyProtocolRepItemInstantiateException - if failure occurs while constructing the rep item.