use of com.sun.appserv.management.base.AMX in project Payara by payara.
the class SystemPropertiesAccessTest method checkGetProperties.
public synchronized void checkGetProperties(final ObjectName src) throws Exception {
final AMX proxy = getProxy(src, AMX.class);
if (!(proxy instanceof SystemPropertiesAccess)) {
throw new IllegalArgumentException("MBean does not implement SystemPropertiesAccess: " + quote(src));
}
final SystemPropertiesAccess props = (SystemPropertiesAccess) proxy;
checkPropertiesGet(props);
}
use of com.sun.appserv.management.base.AMX in project Payara by payara.
the class AMXTestBase method isRemoteIncomplete.
protected boolean isRemoteIncomplete(final ObjectName objectName) {
final AMX amx = getProxyFactory().getProxy(objectName, AMX.class);
final String j2eeType = amx.getJ2EEType();
final boolean isRemote = !amx.isDAS();
if (isRemote && !EXPECTED_REMOTE_INCOMPLETE_TYPES.contains(j2eeType)) {
warning("isRemoteIncomplete: not expecting j2eeType=" + j2eeType + ", has the implementation changed?");
}
return isRemote;
}
use of com.sun.appserv.management.base.AMX in project Payara by payara.
the class CoverageInfoAnalyzer method getCoverageSummary.
public String getCoverageSummary() {
final Set<AMX> amx = mTestUtil.getAllAMX();
final Map<String, CoverageInfo> coverage = getCoverage(amx);
final String[] j2eeTypes = GSetUtil.toStringArray(coverage.keySet());
Arrays.sort(j2eeTypes);
final String LINE_SEP = System.getProperty("line.separator");
final StringBuilder builder = new StringBuilder();
for (final String j2eeType : j2eeTypes) {
final CoverageInfo info = coverage.get(j2eeType);
final String infoString = "Coverage for j2eeType = " + j2eeType + ": " + (info.getFullCoverage() ? "100%" : "INCOMPLETE COVERAGE") + LINE_SEP + info.toString(false) + LINE_SEP + LINE_SEP;
builder.append(infoString);
}
final String msg = "No AMX MBeans having the following types " + "were ever present, and so were NEVER TESTED:" + NEWLINE;
builder.append(createMissingString(msg));
return builder.toString();
}
use of com.sun.appserv.management.base.AMX in project Payara by payara.
the class TestUtil method getAllAMX.
/**
* @return all AMX, sorted by ObjectName
*/
public SortedSet<AMX> getAllAMX() {
final SortedSet<ObjectName> all = getAllObjectNames();
final SortedSet<AMX> allAMX = new TreeSet<AMX>(new AMXComparator<AMX>());
final ProxyFactory proxyFactory = Util.getExtra(mDomainRoot).getProxyFactory();
for (final ObjectName objectName : all) {
try {
final AMX amx = proxyFactory.getProxy(objectName, AMX.class);
allAMX.add(amx);
} catch (Exception e) {
trace(ExceptionUtil.toString(e));
}
}
return allAMX;
}
use of com.sun.appserv.management.base.AMX in project Payara by payara.
the class TestUtil method getAllAMX.
public <T> SortedSet<T> getAllAMX(final Class<T> theInterface) {
final SortedSet<AMX> all = getAllAMX();
final TreeSet<AMX> allOfInterface = new TreeSet<AMX>(new AMXComparator<AMX>());
for (final AMX amx : all) {
if (theInterface.isAssignableFrom(amx.getClass())) {
allOfInterface.add(amx);
}
}
return TypeCast.asSortedSet(allOfInterface);
}
Aggregations