source: geniuswebcore/geniusweb/protocol/NegoSettings.py@ 68

Last change on this file since 68 was 67, checked in by Bart Vastenhouw, 3 years ago

Added SAOP and simplerunner to GeniusWebPython. Several minor fixes.

File size: 1.2 KB
Line 
1from abc import ABC, abstractmethod
2
3from pyson.JsonSubTypes import JsonSubTypes
4from pyson.JsonTypeInfo import JsonTypeInfo, As, Id
5from tudelft_utilities_logging.Reporter import Reporter
6
7from geniusweb.protocol.NegoProtocol import NegoProtocol
8
9
10@JsonSubTypes( ["geniusweb.protocol.session.saop.SAOPSettings.SAOPSettings" ])
11@JsonTypeInfo(use = Id.NAME, include = As.WRAPPER_OBJECT)
12class NegoSettings(ABC):
13 '''
14 Interface for negotiation settings. A negotiation can be either a single
15 session or a tournament
16 '''
17 @abstractmethod
18 def getMaxRunTime(self) -> float:
19 '''
20 @return the maximum run time (seconds). In deterministic runs this can be
21 an exact number (#sessions * runtime per session) but this
22 interface also allows more random tournament protocols. The
23 protocol should stick closely with the maximum it provides to
24 enable planning of tournaments properly.
25 '''
26
27 @abstractmethod
28 def getProtocol(self, logger:Reporter)->NegoProtocol :
29 '''
30 @param logger the logger where the protocol can log events to.
31 @return an initialized and ready to use {@link NegoProtocol} that can
32 handle this Negotiation.
33 '''
Note: See TracBrowser for help on using the repository browser.