Create "server manager" to handle scheduling of tasks (recurring/event drive) and provide an interface for callbacks
The existing plugin code doesn't utilize a uniform way for managing events and callbacks. As the complexity of the plugin grows, it would be very nice to have a single location to register and trigger server callbacks.
Development tasks:
- Create a single class (
SonadorServerManager
) which is used to managed scheduled (timer based) and change event callbacks. - Should provide two methods for registering callbacks with the manager:
register_recurring_task
andregister_serverchange_callback
- Provide a mechanism to trigger events outside of Orthanc's callback system (such as using API endpoints, refer to #8 (closed) )