source: protocol/src/main/java/geniusweb/protocol/session/SessionSettings.java

Last change on this file was 52, checked in by ruud, 13 months ago

Fixed small issues in domaineditor.

File size: 2.2 KB
Line 
1package geniusweb.protocol.session;
2
3import java.util.List;
4
5import com.fasterxml.jackson.annotation.JsonSubTypes;
6
7import geniusweb.protocol.NegoSettings;
8import geniusweb.protocol.session.amop.AMOPSettings;
9import geniusweb.protocol.session.learn.LearnSettings;
10import geniusweb.protocol.session.mopac.MOPACSettings;
11import geniusweb.protocol.session.mopac2.MOPAC2Settings;
12import geniusweb.protocol.session.saop.SAOPSettings;
13import geniusweb.protocol.session.shaop.SHAOPSettings;
14import geniusweb.references.PartyWithProfile;
15import tudelft.utilities.logging.Reporter;
16
17/**
18 * interface for settings for session protocols. Immutable.
19 */
20@JsonSubTypes({ @JsonSubTypes.Type(value = SAOPSettings.class),
21 @JsonSubTypes.Type(value = SHAOPSettings.class),
22 @JsonSubTypes.Type(value = AMOPSettings.class),
23 @JsonSubTypes.Type(value = MOPACSettings.class),
24 @JsonSubTypes.Type(value = MOPAC2Settings.class),
25 @JsonSubTypes.Type(value = LearnSettings.class) })
26public interface SessionSettings extends NegoSettings {
27
28 /**
29 * Get the {@link TeamInfo}s.
30 *
31 * @return list of {@link PartyWithProfile} items.
32 */
33 List<TeamInfo> getTeams();
34
35 /**
36 * @return the size of each {@link TeamInfo}. Usually 1 (SAOP etc) or
37 * sometimes 2 (SHAOP). Used eg by tournament runner to determine
38 * proper team construction.
39 */
40 Integer getTeamSize();
41
42 /**
43 * Allows modification of SessionSettings to include a party. This is needed
44 * for tournament auto-configuration of sessions.
45 *
46 * @param partyprofteam the {@link TeamInfo} to be added
47 * @return new modified SessionSettings object
48 */
49 SessionSettings with(TeamInfo partyprofteam);
50
51 /**
52 *
53 * @return all parties from all teams, as a flattened ordered list. The
54 * order : start with all parties from team 1, then all from team 2,
55 * etc. The specific order of the parties from a team depends on the
56 * protocol.
57 */
58 List<PartyWithProfile> getAllParties();
59
60 /**
61 * @param logger the logger where the protocol can log events to.
62 * @return the an initialized and ready to use {@link SessionProtocol} that
63 * can handle this Negotiation.
64 */
65 @Override
66 SessionProtocol getProtocol(Reporter logger);
67
68}
Note: See TracBrowser for help on using the repository browser.