< prev index next >
application/tests/org.openjdk.jmc.rjmx.test/src/test/java/org/openjdk/jmc/rjmx/test/subscription/AttributeSubscriptionTest.java
Print this page
@@ -58,11 +58,11 @@
@Test
public void testSubscribeToCPULoad() throws Exception {
IConnectionHandle handle = IServerHandle.create(LocalRJMXTestToolkit.createDefaultDescriptor()).connect("Test");
ISubscriptionService subscriptionService = handle.getServiceOrThrow(ISubscriptionService.class);
try {
- MRI attributeDescriptor = new MRI(Type.ATTRIBUTE, "java.lang:type=OperatingSystem", "SystemCpuLoad"); //$NON-NLS-1$ //$NON-NLS-2$
+ MRI attributeDescriptor = new MRI(Type.ATTRIBUTE, "java.lang:type=OperatingSystem", "SystemCpuLoad");
subscriptionService.addMRIValueListener(attributeDescriptor, this);
synchronized (this) {
for (int i = 0; i < 4; i++) {
this.wait(TEST_TIMEOUT_TIME);
}
@@ -79,12 +79,12 @@
public void testGetAttributeSubscriptionOneShot() throws Exception {
// Starting up a subscription on a one shot attribute.
IConnectionHandle handle = IServerHandle.create(LocalRJMXTestToolkit.createDefaultDescriptor()).connect("Test");
ISubscriptionService subscriptionService = handle.getServiceOrThrow(ISubscriptionService.class);
try {
- MRI availableProcessorsAttribute = new MRI(Type.ATTRIBUTE, "java.lang:type=OperatingSystem", //$NON-NLS-1$
- "AvailableProcessors"); //$NON-NLS-1$
+ MRI availableProcessorsAttribute = new MRI(Type.ATTRIBUTE, "java.lang:type=OperatingSystem",
+ "AvailableProcessors");
subscriptionService.addMRIValueListener(availableProcessorsAttribute, this);
// Since it's a one shot and pretty fast, it may already have been retrieved...
if (subscriptionService.getLastMRIValueEvent(availableProcessorsAttribute) == null) {
@@ -107,12 +107,12 @@
@Test
public void testGetAttributeSubscriptionOne() {
try {
// Starting up a subscription on a one shot attribute.
- MRI physicalMemoryUsedAttribute = new MRI(Type.ATTRIBUTE, "java.lang:type=OperatingSystem", //$NON-NLS-1$
- "UsedPhysicalMemorySize"); //$NON-NLS-1$
+ MRI physicalMemoryUsedAttribute = new MRI(Type.ATTRIBUTE, "java.lang:type=OperatingSystem",
+ "UsedPhysicalMemorySize");
getAttributeSubscriptionService().addMRIValueListener(physicalMemoryUsedAttribute, this);
synchronized (this) {
wait(TEST_TIMEOUT_TIME);
}
@@ -126,13 +126,13 @@
@Test
public void testGetAttributeSubscriptionTwo() {
try {
// Starting up a subscription on a one shot attribute.
- MRI tcad = new MRI(Type.ATTRIBUTE, "java.lang:type=OperatingSystem", "UsedPhysicalMemorySize"); //$NON-NLS-1$ //$NON-NLS-2$
+ MRI tcad = new MRI(Type.ATTRIBUTE, "java.lang:type=OperatingSystem", "UsedPhysicalMemorySize");
getAttributeSubscriptionService().addMRIValueListener(tcad, this);
- MRI tstcad = new MRI(Type.ATTRIBUTE, "java.lang:type=OperatingSystem", "FreePhysicalMemorySize"); //$NON-NLS-1$ //$NON-NLS-2$
+ MRI tstcad = new MRI(Type.ATTRIBUTE, "java.lang:type=OperatingSystem", "FreePhysicalMemorySize");
getAttributeSubscriptionService().addMRIValueListener(tstcad, this);
for (int i = 0; i < 7; i++) {
synchronized (this) {
wait(TEST_TIMEOUT_TIME);
@@ -154,11 +154,11 @@
@Test
public void testGetSyntheticSubscription() {
try {
// Starting up a subscription on a one shot attribute.
- MRI synthad = new MRI(Type.ATTRIBUTE, "java.lang:type=Memory", "HeapMemoryUsagePercent"); //$NON-NLS-1$ //$NON-NLS-2$
+ MRI synthad = new MRI(Type.ATTRIBUTE, "java.lang:type=Memory", "HeapMemoryUsagePercent");
getAttributeSubscriptionService().addMRIValueListener(synthad, this);
synchronized (this) {
wait(TEST_TIMEOUT_TIME);
}
@@ -173,11 +173,11 @@
@Test
public void testGetSyntheticPhysicalMemSubscription() {
try {
// Starting up a subscription on a one shot attribute.
- MRI synthad = new MRI(Type.ATTRIBUTE, "java.lang:type=OperatingSystem", "PhysicalMemoryUsagePercent"); //$NON-NLS-1$ //$NON-NLS-2$
+ MRI synthad = new MRI(Type.ATTRIBUTE, "java.lang:type=OperatingSystem", "PhysicalMemoryUsagePercent");
getAttributeSubscriptionService().addMRIValueListener(synthad, this);
synchronized (this) {
wait(TEST_TIMEOUT_TIME);
}
< prev index next >