package geniusweb.protocol.tournament.allpermutationslearn; import geniusweb.protocol.tournament.TournamentState; import geniusweb.protocol.tournament.allpermutations.AllPermutationsProtocol; import geniusweb.protocol.tournament.allpermutations.AllPermutationsState; import geniusweb.references.ProtocolRef; import tudelft.utilities.logging.Reporter; /** * This protocol creates sequentially all permutations of available parties and * profiles, See {@link AllPermutationsLearnSettings} for details. Only 1 * session is run at a time because managing multiple sessions is more complex * to manage in the {@link TournamentState} * */ public class AllPermutationsLearnProtocol extends AllPermutationsProtocol { private static final ProtocolRef APPLearn = new ProtocolRef("APPLearn"); /** * * @param state the {@link AllPermutationsState} * @param logger used for all logging, about the tournament, and the created * the session and protocols. */ public AllPermutationsLearnProtocol(AllPermutationsLearnState state, Reporter logger) { super(state, logger); } @Override public String getDescription() { return "Runs all possible permutations of provided parties and profiles, " + "with the given number of parties per session. Sessions run one at a time. " + "In each session, all parties receive FileLocations in the 'negotiationdata' parameter." + "If reuseParties is set, then a party can occur more than 1 time in each session. " + "The sessionSettings determine the baseline settings for each session, eg the deadline " + "and the protocol to be used. The AllPermutationsProtocol supports all basic SessionProtocols. " + "parties and protocols already available in the settings will participate in every session. " + "After all sessions have been run, a Learn session is done where all parties receive their" + "previously stored FileLocations again."; } @Override public ProtocolRef getRef() { return APPLearn; } }