/**
  * Informs all listeners.
  *
  * @param listeners list with the listener objects
  * @param action identifier which callback should be called
  * @param param parameter for the call
  * @param handler the current progress handler
  */
 private void informListeners(
     List listeners, int action, Object param, AbstractUIProgressHandler handler) {
   // Iterate the action list.
   Iterator iter = listeners.iterator();
   UninstallerListener il = null;
   while (iter.hasNext()) {
     try {
       il = (UninstallerListener) iter.next();
       switch (action) {
         case UninstallerListener.BEFORE_DELETION:
           il.beforeDeletion((List) param, handler);
           break;
         case UninstallerListener.AFTER_DELETION:
           il.afterDeletion((List) param, handler);
           break;
         case UninstallerListener.BEFORE_DELETE:
           il.beforeDelete((File) param, handler);
           break;
         case UninstallerListener.AFTER_DELETE:
           il.afterDelete((File) param, handler);
           break;
       }
     } catch (Throwable e) { // Catch it to prevent for a block of uninstallation.
       handler.emitError(
           "Skipping custom action because exception caught during " + il.getClass().getName(),
           e.toString());
     }
   }
 }