serverinfo
serverinfo copied to clipboard
Common interface for all statistic classes
- [ ] Write
IStatisticsProvider
interface- [ ]
getName()
to retrieve the name of the key to publish the statistics under - [ ]
getGroup()
to retrieve the name of the group key to publish the statistics under - [ ]
getStatistics()
returns the stats to retrieve
- [ ]
- [ ] Write
StatisticsService
- [ ]
registerStatisticsProvider(IStatisticsProvider)
- [ ]
IStatisticsProvider[] getStatisticsProviders()
- [ ]
- [ ] adjust ApiController
- [ ] receive StatisticsProvider injected instead of all the custom classes
- [ ] query
StatisticsProvider->getStatisticsProviders()
and iterate and compile the stats
- [ ] cleanup ApiControllerTest
- [ ] rewrite the custom classes to implement
IStatisticsProvider
- [ ] register the custom classes in the application initialization
This cleantup and enhancement would also open the door to allowing third party apps to register their own statistics providers in the future.