FileDocCategorySizeDatePackage
PrintMBeanDescriptionUtil.javaAPI DocGlassfish v2 API8046Fri May 04 22:34:08 BST 2007com.sun.enterprise.admin.server.core.mbean.test

PrintMBeanDescriptionUtil

public class PrintMBeanDescriptionUtil extends Object

Fields Summary
Constructors Summary
public PrintMBeanDescriptionUtil()
Creates new MBeanInfoTester

    
Methods Summary
public static voidmain(java.lang.String[] args)

param
args the command line arguments

        new PrintMBeanDescriptionUtil().test(args);
    
private voidprint(java.lang.String str)

        System.out.println(str);
    
private voidprintDescr(javax.management.MBeanParameterInfo info)

        printDescr(info.getDescription());
    
private voidprintDescr(java.lang.String descr)

        if(descr!=null && descr.length()>0)
            print(descr+" = "+descr);
    
private voidprintDescr(java.lang.Object[] infos)

        for(int i=0; i<infos.length; i++)
            if(infos[i] instanceof MBeanAttributeInfo)
                printDescr((MBeanAttributeInfo)infos[i]);
            else
                if(infos[i] instanceof MBeanConstructorInfo)
                    printDescr((MBeanConstructorInfo)infos[i]);
                else
                    if(infos[i] instanceof MBeanNotificationInfo)
                        printDescr((MBeanNotificationInfo)infos[i]);
                    else
                        if(infos[i] instanceof MBeanOperationInfo)
                            printDescr((MBeanOperationInfo)infos[i]);
                        else
                            if(infos[i] instanceof MBeanParameterInfo)
                                printDescr((MBeanParameterInfo)infos[i]);
    
private voidprintDescr(javax.management.MBeanInfo info)

        printDescr(info.getDescription());
        printDescr(info.getAttributes());
        printDescr(info.getConstructors());
        printDescr(info.getNotifications());
        printDescr(info.getOperations());
    
private voidprintDescr(javax.management.MBeanAttributeInfo info)

        printDescr(info.getDescription());
    
private voidprintDescr(javax.management.MBeanConstructorInfo info)

        printDescr(info.getDescription());
        printDescr(info.getSignature());
    
private voidprintDescr(javax.management.MBeanNotificationInfo info)

        printDescr(info.getDescription());
        printDescr(info.getNotifTypes());
    
private voidprintDescr(javax.management.MBeanOperationInfo info)

        printDescr(info.getDescription());
        printDescr(info.getSignature());
    
private voidprintPropertyEntries(javax.management.DynamicMBean mbean)

        print("\n#**************************************************************");
        String name = mbean.getClass().getName();
        name = name.substring(name.lastIndexOf('.")+1);
        print("# Text Descriptions for MBean: "+name);
        print("#**************************************************************");
        printDescr(mbean.getMBeanInfo());
    
public voidtest(java.lang.String[] args)

        try
        {
            MBeanServer	mbs	= SunoneInterceptor.getMBeanServerInstance();
            printPropertyEntries(new GenericConfigurator());
//            printPropertyEntries(new JCAAdminHandler());
            printPropertyEntries(new JMSAdminHandler("ias1"));
            printPropertyEntries(new ManagedCustomResource("ias1","any"));
            printPropertyEntries(new ManagedEjbContainer("ias1"));
//            printPropertyEntries(new ManagedHTTPConnectionGroup("ias1","any","any"));
            printPropertyEntries(new ManagedHTTPListener("ias1","any"));
            printPropertyEntries(new ManagedHTTPService("ias1"));
            printPropertyEntries(new ManagedJDBCConnectionPool("ias1","any"));
            printPropertyEntries(new ManagedJDBCResource("ias1","any"));
            printPropertyEntries(new ManagedJMSResource("ias1","any"));
            printPropertyEntries(new ManagedJNDIResource("ias1","any"));
            printPropertyEntries(new ManagedJVM("ias1"));
            printPropertyEntries(new ManagedJavaMailResource("ias1","any"));
            printPropertyEntries(new ManagedLogService("ias1"));
            printPropertyEntries(new ManagedMdbContainer("ias1"));
            printPropertyEntries(new ManagedORBComponent("ias1"));
            printPropertyEntries(new ManagedORBListener("ias1","any"));
            printPropertyEntries(new ManagedPMFactoryResource("ias1","any"));
            printPropertyEntries(new ManagedSecurityService("ias1"));
            printPropertyEntries(new ManagedServerInstance("ias1",new HostAndPort("any",1), false));
            printPropertyEntries(new ManagedStandaloneConnectorModule("ias1","any"));
            printPropertyEntries(new ManagedStandaloneJ2EEEjbJarModule("ias1","any"));
            printPropertyEntries(new ManagedStandaloneJ2EEWebModule("ias1","any"));
            printPropertyEntries(new ManagedTransactionService("ias1"));
            printPropertyEntries(new ManagedWebContainer("ias1"));
            printPropertyEntries(new ServerController());
        }
        catch(Throwable e)
        {
            print(e.getMessage());
            e.printStackTrace();
        }