X-Git-Url: https://git.mxchange.org/?p=quix0rs-apt-p2p.git;a=blobdiff_plain;f=apt_p2p%2Finterfaces.py;h=f72cd8e23afa20cc07db24717a427d9e813d92af;hp=b38de39b016738bb0bc79235e44a57657b7d7858;hb=HEAD;hpb=7b1167d8ce780312d3689c9309c7e9c64060c085 diff --git a/apt_p2p/interfaces.py b/apt_p2p/interfaces.py index b38de39..f72cd8e 100644 --- a/apt_p2p/interfaces.py +++ b/apt_p2p/interfaces.py @@ -41,3 +41,26 @@ class IDHT(Interface): The length of the key may be adjusted for use with the DHT. """ + +class IDHTStats(Interface): + """An abstract interface for DHTs that support statistics gathering.""" + + def getStats(self): + """Gather and format all the statistics for the DHT. + + The statistics will be formatted for inclusion in the body + of an HTML page. + + @rtype: C{string} + @return: the formatted statistics, suitable for displaying to the user + """ + +class IDHTStatsFactory(Interface): + """An abstract interface for DHTs that support statistics displaying.""" + + def getStatsFactory(self): + """Create and return an HTTP factory for displaying statistics. + + @rtype: + """ + \ No newline at end of file