jdk/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java
changeset 623 97dd054b7f1f
parent 526 61ba2d5ea9da
child 833 bfa2bef7517c
child 715 f16baef3a20e
equal deleted inserted replaced
622:0cacefd2642b 623:97dd054b7f1f
  1694                 responseList.add(new Attribute(attrNames[i],
  1694                 responseList.add(new Attribute(attrNames[i],
  1695                                      getAttribute(attrNames[i])));
  1695                                      getAttribute(attrNames[i])));
  1696             } catch (Exception e) {
  1696             } catch (Exception e) {
  1697                 // eat exceptions because interface doesn't have an
  1697                 // eat exceptions because interface doesn't have an
  1698                 // exception on it
  1698                 // exception on it
  1699                 if (MODELMBEAN_LOGGER.isLoggable(Level.WARNING)) {
  1699                 if (MODELMBEAN_LOGGER.isLoggable(Level.FINER)) {
  1700                     MODELMBEAN_LOGGER.logp(Level.WARNING,
  1700                     MODELMBEAN_LOGGER.logp(Level.FINER,
  1701                             RequiredModelMBean.class.getName(),
  1701                             RequiredModelMBean.class.getName(),
  1702                         "getAttributes(String[])",
  1702                         "getAttributes(String[])",
  1703                             "Failed to get \"" + attrNames[i] + "\": ", e);
  1703                             "Failed to get \"" + attrNames[i] + "\": ", e);
  1704                 }
  1704                 }
  1705             }
  1705             }
  1855                             InvalidAttributeValueException(clazz.getName() +
  1855                             InvalidAttributeValueException(clazz.getName() +
  1856                                                            " expected, "   +
  1856                                                            " expected, "   +
  1857                                             attrValue.getClass().getName() +
  1857                                             attrValue.getClass().getName() +
  1858                                                            " received.");
  1858                                                            " received.");
  1859                     } catch (ClassNotFoundException x) {
  1859                     } catch (ClassNotFoundException x) {
  1860                         if (MODELMBEAN_LOGGER.isLoggable(Level.WARNING)) {
  1860                         if (MODELMBEAN_LOGGER.isLoggable(Level.FINER)) {
  1861                             MODELMBEAN_LOGGER.logp(Level.WARNING,
  1861                             MODELMBEAN_LOGGER.logp(Level.FINER,
  1862                                     RequiredModelMBean.class.getName(),
  1862                                     RequiredModelMBean.class.getName(),
  1863                                 "setAttribute(Attribute)","Class " +
  1863                                 "setAttribute(Attribute)","Class " +
  1864                                     attrType + " for attribute "
  1864                                     attrType + " for attribute "
  1865                                 + attrName + " not found: ", x);
  1865                                 + attrName + " not found: ", x);
  1866                         }
  1866                         }
  2222                             ((new Date(ntfyObj.getTimeStamp())).toString())+
  2222                             ((new Date(ntfyObj.getTimeStamp())).toString())+
  2223                             " " + ntfyObj.getType() + " " +
  2223                             " " + ntfyObj.getType() + " " +
  2224                             ntfyObj.getMessage() + " Severity = " +
  2224                             ntfyObj.getMessage() + " Severity = " +
  2225                             (String)ntfyDesc.getFieldValue("severity"));
  2225                             (String)ntfyDesc.getFieldValue("severity"));
  2226                     } catch (Exception e) {
  2226                     } catch (Exception e) {
  2227                         if (MODELMBEAN_LOGGER.isLoggable(Level.WARNING)) {
  2227                         if (MODELMBEAN_LOGGER.isLoggable(Level.FINE)) {
  2228                             MODELMBEAN_LOGGER.logp(Level.WARNING,
  2228                             MODELMBEAN_LOGGER.logp(Level.FINE,
  2229                                     RequiredModelMBean.class.getName(),
  2229                                     RequiredModelMBean.class.getName(),
  2230                                     "sendNotification(Notification)",
  2230                                     "sendNotification(Notification)",
  2231                                     "Failed to log " +
  2231                                     "Failed to log " +
  2232                                     ntfyObj.getType() + " notification: ", e);
  2232                                     ntfyObj.getType() + " notification: ", e);
  2233                         }
  2233                         }
  2616                            ntfyObj.getMessage() +
  2616                            ntfyObj.getMessage() +
  2617                            " Name = " + ntfyObj.getAttributeName() +
  2617                            " Name = " + ntfyObj.getAttributeName() +
  2618                            " Old value = " + oldv +
  2618                            " Old value = " + oldv +
  2619                            " New value = " + newv);
  2619                            " New value = " + newv);
  2620                     } catch (Exception e) {
  2620                     } catch (Exception e) {
  2621                         if (MODELMBEAN_LOGGER.isLoggable(Level.WARNING)) {
  2621                         if (MODELMBEAN_LOGGER.isLoggable(Level.FINE)) {
  2622                             MODELMBEAN_LOGGER.logp(Level.WARNING,
  2622                             MODELMBEAN_LOGGER.logp(Level.FINE,
  2623                                     RequiredModelMBean.class.getName(),mth,
  2623                                     RequiredModelMBean.class.getName(),mth,
  2624                                 "Failed to log " + ntfyObj.getType() +
  2624                                 "Failed to log " + ntfyObj.getType() +
  2625                                     " notification: ", e);
  2625                                     " notification: ", e);
  2626                         }
  2626                         }
  2627                     }
  2627                     }
  2642                            ntfyObj.getMessage() +
  2642                            ntfyObj.getMessage() +
  2643                            " Name = " + ntfyObj.getAttributeName() +
  2643                            " Name = " + ntfyObj.getAttributeName() +
  2644                            " Old value = " + oldv +
  2644                            " Old value = " + oldv +
  2645                            " New value = " + newv);
  2645                            " New value = " + newv);
  2646                     } catch (Exception e) {
  2646                     } catch (Exception e) {
  2647                         if (MODELMBEAN_LOGGER.isLoggable(Level.WARNING)) {
  2647                         if (MODELMBEAN_LOGGER.isLoggable(Level.FINE)) {
  2648                             MODELMBEAN_LOGGER.logp(Level.WARNING,
  2648                             MODELMBEAN_LOGGER.logp(Level.FINE,
  2649                                     RequiredModelMBean.class.getName(),mth,
  2649                                     RequiredModelMBean.class.getName(),mth,
  2650                                 "Failed to log " + ntfyObj.getType() +
  2650                                 "Failed to log " + ntfyObj.getType() +
  2651                                     " notification: ", e);
  2651                                     " notification: ", e);
  2652                         }
  2652                         }
  2653                     }
  2653                     }