Fork me on GitHub
<< back to Core Developers Guide Edit on GitHub


Use a DispatcherListener object to execute code when a Dispatcher is initialized or destroyed. A DispatcherListener is an easy way to associate customizable components like a ConfigurationManager with a Dispatcher.


  static {
     Dispatcher.addDispatcherListener(new DispatcherListener() {
         public void dispatcherInitialized(Dispatcher du) {
            // do something to Dispatcher after it is initialized eg.

         public void dispatcherDestroyed(Dispatcher du) {
            // do some cleanup after Dispatcher is destroyed.