|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.websphere.pmi.PmiJmxTest
Sample code to use AdminClient API directly to get PMI data from PerfMBean and individual MBeans which support getStats method.
Constructor Summary | |
---|---|
PmiJmxTest()
Creates a new test object (Need a default constructor for the testing framework) |
Method Summary | |
---|---|
void |
doTest()
Some sample code to set level, get data, and display data. |
com.ibm.websphere.management.AdminClient |
getAdminClient(java.lang.String hostStr,
java.lang.String portStr,
java.lang.String connector)
get AdminClient using the given host, port, and connector |
protected com.ibm.websphere.pmi.stat.MBeanLevelSpec[] |
getInstrumentationLevel(javax.management.ObjectName on,
boolean recursive)
Sample code to get level |
protected com.ibm.websphere.pmi.stat.MBeanLevelSpec[] |
getInstrumentationLevel(javax.management.ObjectName on,
com.ibm.websphere.pmi.stat.StatDescriptor sd,
boolean recursive)
Sample code to get level |
void |
getObjectNames()
get all the ObjectNames. |
com.ibm.websphere.pmi.stat.MBeanStatDescriptor |
getStatDescriptor(javax.management.ObjectName oName,
java.lang.String name)
sample code to show how to get a specific MBeanStatDescriptor |
com.ibm.websphere.pmi.stat.Stats |
getStatsObject(javax.management.ObjectName on,
boolean recursive)
Sample code to get a Stats object |
com.ibm.websphere.pmi.stat.Stats |
getStatsObject(javax.management.ObjectName on,
com.ibm.websphere.pmi.stat.StatDescriptor sd,
boolean recursive)
Sample code to get a Stats object |
void |
init(java.lang.String[] args)
parse args and getAdminClient |
com.ibm.websphere.pmi.stat.MBeanStatDescriptor[] |
listStatMembers(com.ibm.websphere.pmi.stat.MBeanStatDescriptor mName)
Sample code to get MBeanStatDescriptors |
com.ibm.websphere.pmi.stat.MBeanStatDescriptor[] |
listStatMembers(javax.management.ObjectName mName)
sample code to show you how to navigate MBeanStatDescriptor via listStatMembers |
static void |
main(java.lang.String[] args)
|
protected void |
setInstrumentationLevel(javax.management.ObjectName on,
com.ibm.websphere.pmi.stat.StatDescriptor sd,
int level)
Sample code to set level |
void |
setServerConfig(com.ibm.websphere.pmi.stat.Stats stats)
The Stats object returned from server does not have static config info. |
void |
testEJB()
sample code to get PMI data from beanModule |
void |
testJSR77Stats()
Sample code to show how to call getStats on StatisticProvider MBean directly. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PmiJmxTest()
Method Detail |
public static void main(java.lang.String[] args)
args[0]
- hostargs[1]
- port, optional, default is 8880args[2]
- connectorType, optional, default is SOAP connectorpublic void init(java.lang.String[] args)
public com.ibm.websphere.management.AdminClient getAdminClient(java.lang.String hostStr, java.lang.String portStr, java.lang.String connector)
public void getObjectNames()
public void doTest()
protected com.ibm.websphere.pmi.stat.MBeanLevelSpec[] getInstrumentationLevel(javax.management.ObjectName on, com.ibm.websphere.pmi.stat.StatDescriptor sd, boolean recursive)
protected com.ibm.websphere.pmi.stat.MBeanLevelSpec[] getInstrumentationLevel(javax.management.ObjectName on, boolean recursive)
protected void setInstrumentationLevel(javax.management.ObjectName on, com.ibm.websphere.pmi.stat.StatDescriptor sd, int level)
public com.ibm.websphere.pmi.stat.Stats getStatsObject(javax.management.ObjectName on, com.ibm.websphere.pmi.stat.StatDescriptor sd, boolean recursive)
public com.ibm.websphere.pmi.stat.Stats getStatsObject(javax.management.ObjectName on, boolean recursive)
public void setServerConfig(com.ibm.websphere.pmi.stat.Stats stats)
public com.ibm.websphere.pmi.stat.MBeanStatDescriptor getStatDescriptor(javax.management.ObjectName oName, java.lang.String name)
public com.ibm.websphere.pmi.stat.MBeanStatDescriptor[] listStatMembers(javax.management.ObjectName mName)
public com.ibm.websphere.pmi.stat.MBeanStatDescriptor[] listStatMembers(com.ibm.websphere.pmi.stat.MBeanStatDescriptor mName)
public void testEJB()
public void testJSR77Stats()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |