use of javax.management.openmbean.OpenDataException in project openj9 by eclipse.
the class TestMonitorInfo method createGoodMonitorInfoCompositeType.
/**
* @return <code>CompositeType</code> for use when wrapping up
* <code>MonitorInfo</code> objects in <code>CompositeData</code>s.
*/
static CompositeType createGoodMonitorInfoCompositeType() {
CompositeType result = null;
try {
String[] typeNames = { "className", "identityHashCode", "lockedStackFrame", "lockedStackDepth" };
String[] typeDescs = { "className", "identityHashCode", "lockedStackFrame", "lockedStackDepth" };
OpenType[] typeTypes = { SimpleType.STRING, SimpleType.INTEGER, createStackTraceElementCompositeTypeObject(), SimpleType.INTEGER };
result = new CompositeType(MonitorInfo.class.getName(), MonitorInfo.class.getName(), typeNames, typeDescs, typeTypes);
} catch (OpenDataException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return result;
}
use of javax.management.openmbean.OpenDataException in project openj9 by eclipse.
the class TestMonitorInfo method createGoodCompositeData.
/**
* @return a new <code>CompositeData</code> instance representing a
* <code>MonitorInfo</code>.
*/
static CompositeData createGoodCompositeData() {
CompositeData result = null;
String[] names = { "className", "identityHashCode", "lockedStackFrame", "lockedStackDepth" };
Object[] values = { /* className */
new String(GOOD_CD_CLASSNAME), /* identityHashCode */
Integer.valueOf(GOOD_CD_IDHASHCODE), /* lockedStackFrame */
createGoodStackTraceElementCompositeData(), /* lockedStackDepth */
Integer.valueOf(GOOD_CD_STACKDEPTH) };
CompositeType cType = createGoodMonitorInfoCompositeType();
try {
result = new CompositeDataSupport(cType, names, values);
} catch (OpenDataException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return result;
}
use of javax.management.openmbean.OpenDataException in project openj9 by eclipse.
the class TestLockInfo method createGoodCompositeData.
/**
* @return a new <code>CompositeData</code> instance representing a
* <code>LockInfo</code>.
*/
static CompositeData createGoodCompositeData() {
CompositeData result = null;
String[] names = { "className", "identityHashCode" };
Object[] values = { /* className */
new String(GOOD_CD_CLASSNAME), /* identityHashCode */
Integer.valueOf(GOOD_CD_IDHASHCODE) };
CompositeType cType = createGoodLockInfoCompositeType();
try {
result = new CompositeDataSupport(cType, names, values);
} catch (OpenDataException e) {
e.printStackTrace();
}
return result;
}
use of javax.management.openmbean.OpenDataException in project openj9 by eclipse.
the class TestLockInfo method createGoodLockInfoCompositeType.
/**
* @return <code>CompositeType</code> for use when wrapping up
* <code>LockInfo</code> objects in <code>CompositeData</code>s.
*/
static CompositeType createGoodLockInfoCompositeType() {
CompositeType result = null;
try {
String[] typeNames = { "className", "identityHashCode" };
String[] typeDescs = { "className", "identityHashCode" };
OpenType[] typeTypes = { SimpleType.STRING, SimpleType.INTEGER };
result = new CompositeType(LockInfo.class.getName(), LockInfo.class.getName(), typeNames, typeDescs, typeTypes);
} catch (OpenDataException e) {
e.printStackTrace();
Assert.fail("Unexpected exception occurred.");
}
return result;
}
use of javax.management.openmbean.OpenDataException in project openj9 by eclipse.
the class TestThreadInfo method createGoodCompositeDataNoLockInfo.
/**
* @return a new <code>CompositeData</code> instance representing a
* <code>ThreadInfo</code>, does not contain 'LockInfo'.
*/
protected static CompositeData createGoodCompositeDataNoLockInfo() {
CompositeData result = null;
CompositeType cType = createGoodThreadInfoCompositeTypeNoLockInfo();
try {
result = new CompositeDataSupport(cType, typeNamesGlobal, valuesGoodCompositeDataNoLockInfo);
} catch (OpenDataException e) {
e.printStackTrace();
}
return result;
}
Aggregations