Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Common interface for all statistic classes #284

Open
13 tasks
PVince81 opened this issue Mar 1, 2021 · 0 comments
Open
13 tasks

Common interface for all statistic classes #284

PVince81 opened this issue Mar 1, 2021 · 0 comments

Comments

@PVince81
Copy link
Member

PVince81 commented Mar 1, 2021

  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant