source: protocol/src/main/java/geniusweb/protocol/NegoSettings.java@ 29

Last change on this file since 29 was 29, checked in by bart, 3 years ago

some minor fixes

File size: 1.6 KB
Line 
1package geniusweb.protocol;
2
3import com.fasterxml.jackson.annotation.JsonAutoDetect;
4import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
5import com.fasterxml.jackson.annotation.JsonSubTypes;
6import com.fasterxml.jackson.annotation.JsonSubTypes.Type;
7
8import geniusweb.protocol.session.SessionSettings;
9import geniusweb.protocol.tournament.TournamentSettings;
10
11import com.fasterxml.jackson.annotation.JsonTypeInfo;
12
13import tudelft.utilities.logging.Reporter;
14
15/**
16 * Interface for negotiation settings. A negotiation can be either a single
17 * session or a tournament
18 */
19@JsonAutoDetect(fieldVisibility = Visibility.ANY, getterVisibility = Visibility.NONE, setterVisibility = Visibility.NONE, isGetterVisibility = Visibility.NONE)
20@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.WRAPPER_OBJECT)
21@JsonSubTypes({ @Type(value = SessionSettings.class),
22 @Type(value = TournamentSettings.class) })
23
24public interface NegoSettings {
25
26 /**
27 *
28 * @return the maximum run time (seconds). In deterministic runs this can be
29 * an exact number (#sessions * runtime per session) but this
30 * interface also allows more random tournament protocols. The
31 * protocol should stick closely with the maximum it provides to
32 * enable planning of tournaments properly.
33 */
34 public Double getMaxRunTime();
35
36 /**
37 * @param logger the logger where the protocol can log events to.
38 * @return the an initialized and ready to use {@link NegoProtocol} that can
39 * handle this Negotiation.
40 */
41 public NegoProtocol getProtocol(Reporter logger);
42}
Note: See TracBrowser for help on using the repository browser.