com.ibm.websphere.pmi

Class PmiJmxTest

  • java.lang.Object
    • com.ibm.websphere.pmi.PmiJmxTest
  • All Implemented Interfaces:
    PmiConstants


    public class PmiJmxTest
    extends java.lang.Object
    implements PmiConstants
    Sample code using AdminClient API to get PMI data from PerfMBean and individual MBeans.
    • Constructor Detail

      • PmiJmxTest

        public PmiJmxTest()
        Creates a new test object (Need a default constructor for the testing framework)
    • Method Detail

      • main

        public static void main(java.lang.String[] args)
        Parameters:
        args[0] - host
        args[1] - port, optional, default is 8880
        args[2] - connectorType, optional, default is SOAP connector
      • init

        public void init(java.lang.String[] args)
        parse args and getAdminClient
      • getAdminClient

        public AdminClient getAdminClient(java.lang.String hostStr,
                                 java.lang.String portStr,
                                 java.lang.String connector)
        get AdminClient using the given host, port, and connector
      • getObjectNames

        public void getObjectNames()
        get all the ObjectNames.
      • doTestV6

        public void doTestV6()
        Test V6 APIs
      • doTest

        public void doTest()
        Deprecated. Use 6.0 APIs.
        Some sample code to set level, get data, and display data. (V5)
      • getInstrumentationLevel

        protected MBeanLevelSpec[] getInstrumentationLevel(javax.management.ObjectName on,
                                               StatDescriptor sd,
                                               boolean recursive)
        Sample code to get level
      • getInstrumentationLevel

        protected MBeanLevelSpec[] getInstrumentationLevel(javax.management.ObjectName on,
                                               boolean recursive)
        Sample code to get level
      • setInstrumentationLevel

        protected void setInstrumentationLevel(javax.management.ObjectName on,
                                   StatDescriptor sd,
                                   int level)
        Deprecated. Use 6.0 APIs.
        Sample code to set level
      • getStatsObject

        public Stats getStatsObject(javax.management.ObjectName on,
                           StatDescriptor sd,
                           boolean recursive)
        Deprecated. Use 6.0 APIs.
        Sample code to get a Stats object
      • getStatsObject

        public Stats getStatsObject(javax.management.ObjectName on,
                           boolean recursive)
        Sample code to get a Stats object
      • setServerConfig

        public void setServerConfig(Stats stats)
        The Stats object returned from server does not have static config info. You have to set it on client side.
      • getStatDescriptor

        public MBeanStatDescriptor getStatDescriptor(javax.management.ObjectName oName,
                                            java.lang.String name)
        Deprecated. Use 6.0 APIs.
        sample code to show how to get a specific MBeanStatDescriptor
      • listStatMembers

        public MBeanStatDescriptor[] listStatMembers(javax.management.ObjectName mName)
        Deprecated. Use 6.0 APIs.
        sample code to show you how to navigate MBeanStatDescriptor via listStatMembers
      • testEJB

        public void testEJB()
        Deprecated. Use 6.0 APIs.
        sample code to get PMI data from beanModule
      • testJSR77Stats

        public void testJSR77Stats()
        Deprecated. Use 6.0 APIs.
        Sample code to show how to call getStats on StatisticProvider MBean directly.
      • getStatsConfig

        public PmiModuleConfig getStatsConfig(java.lang.String statsType)
        Get PmiModuleConfig from server
      • findConfig

        public PmiModuleConfig findConfig(javax.management.ObjectName on)
        Deprecated. Use com.ibm.websphere.pmi.client.PmiClient.findConfig()
        Get PmiModuleConfig based on MBean ObjectName
      • findConfig

        public PmiModuleConfig findConfig(java.lang.String moduleName)
        Deprecated. Use com.ibm.websphere.pmi.client.PmiClient.findConfig()
        Get PmiModuleConfig based on PMI module name
IBM WebSphere Application ServerTM
Release 9.0