1 23 24 29 30 31 package com.sun.appserv.management.util.jmx.stringifier; 32 33 import javax.management.MBeanNotificationInfo ; 34 35 36 import com.sun.appserv.management.util.stringifier.Stringifier; 37 import com.sun.appserv.management.util.stringifier.ArrayStringifier; 38 39 public class MBeanNotificationInfoStringifier 40 extends MBeanFeatureInfoStringifier implements Stringifier 41 { 42 public final static MBeanNotificationInfoStringifier DEFAULT = new MBeanNotificationInfoStringifier(); 43 44 public 45 MBeanNotificationInfoStringifier() 46 { 47 super( ); 48 } 49 50 public 51 MBeanNotificationInfoStringifier( MBeanFeatureInfoStringifierOptions options ) 52 { 53 super( options ); 54 } 55 56 public String 57 stringify( Object o ) 58 { 59 final MBeanNotificationInfo notif = (MBeanNotificationInfo )o; 60 61 String result = notif.getName() + ":"; 62 63 final String [] notifTypes = notif.getNotifTypes(); 64 result = result + ArrayStringifier.stringify( notifTypes, mOptions.mArrayDelimiter ); 65 66 if ( mOptions.mIncludeDescription ) 67 { 68 result = result + ",\"" + notif.getDescription() + "\""; 69 } 70 71 72 return( result ); 73 } 74 } | Popular Tags |