home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-tomcat-addon-1.4.9-installer.exe / jmx.jar / javax / management / NotificationBroadcasterSupport$3.class (.txt) < prev    next >
Encoding:
Java Class File  |  2002-10-28  |  2.4 KB  |  63 lines

  1. package javax.management;
  2.  
  3. import mx4j.log.Logger;
  4.  
  5. class NotificationBroadcasterSupport$3 implements Runnable {
  6.    // $FF: synthetic field
  7.    private final NotificationFilter val$filter;
  8.    // $FF: synthetic field
  9.    private final Notification val$n;
  10.    // $FF: synthetic field
  11.    private final boolean val$info;
  12.    // $FF: synthetic field
  13.    private final Logger val$logger;
  14.    // $FF: synthetic field
  15.    private final Object val$handback;
  16.    // $FF: synthetic field
  17.    private final NotificationListener val$listener;
  18.    // $FF: synthetic field
  19.    private final NotificationBroadcasterSupport this$0;
  20.  
  21.    NotificationBroadcasterSupport$3(NotificationBroadcasterSupport this$0, NotificationFilter val$filter, Notification val$n, boolean val$info, Logger val$logger, Object val$handback, NotificationListener val$listener) {
  22.       this.this$0 = this$0;
  23.       this.val$filter = val$filter;
  24.       this.val$n = val$n;
  25.       this.val$info = val$info;
  26.       this.val$logger = val$logger;
  27.       this.val$handback = val$handback;
  28.       this.val$listener = val$listener;
  29.    }
  30.  
  31.    public void run() {
  32.       boolean enabled = false;
  33.  
  34.       try {
  35.          enabled = this.val$filter != null && this.val$filter.isNotificationEnabled(this.val$n);
  36.       } catch (RuntimeException x) {
  37.          if (this.val$info) {
  38.             this.val$logger.info("\t\tRuntimeException caught from isNotificationEnabled", x);
  39.          }
  40.       }
  41.  
  42.       if (this.val$info) {
  43.          this.val$logger.info("\t\tFilter is: " + this.val$filter + ", enabled: " + enabled);
  44.       }
  45.  
  46.       if (enabled) {
  47.          if (this.val$info) {
  48.             this.val$logger.info("\t\tHandback is: " + this.val$handback);
  49.             this.val$logger.info("\t\tSending notification " + this.val$n);
  50.          }
  51.  
  52.          try {
  53.             this.val$listener.handleNotification(this.val$n, this.val$handback);
  54.          } catch (RuntimeException x) {
  55.             if (this.val$info) {
  56.                this.val$logger.info("\t\tRuntimeException caught from handleNotification", x);
  57.             }
  58.          }
  59.       }
  60.  
  61.    }
  62. }
  63.