dispose static method

void dispose()

Disposes all dispatchers and cleans up resources.

Should be called when the application is shutting down or the mediator is no longer needed (for example, when testing).

Implementation

static void dispose() {
  events.dispose();
  commands.dispose();
  queries.dispose();
  aggregators.dispose();
}