use of org.apache.camel.component.jmx.beans.ISimpleMXBean in project camel by apache.
the class JMXMonitorTypeLongCounterTest method counter.
@Test
public void counter() throws Exception {
ISimpleMXBean simpleBean = getSimpleMXBean();
// we should get an event after the monitor number reaches 3
simpleBean.setLongNumber(1L);
// this should trigger a notification
simpleBean.setLongNumber(3L);
// we should get 1 change from the counter bean
getMockFixture().waitForMessages();
getMockFixture().assertMessageReceived(new File("src/test/resources/monitor-consumer/monitorNotificationLong.xml"));
}
use of org.apache.camel.component.jmx.beans.ISimpleMXBean in project camel by apache.
the class JMXMonitorTypeStringDiffersTest method differs.
@Test
public void differs() throws Exception {
ISimpleMXBean simpleBean = getSimpleMXBean();
simpleBean.setStringValue("changed");
getMockFixture().waitForMessages();
getMockFixture().assertMessageReceived(new File("src/test/resources/monitor-consumer/stringDiffers.xml"));
}
use of org.apache.camel.component.jmx.beans.ISimpleMXBean in project camel by apache.
the class JMXMonitorTypeStringMatchesTest method matches.
@Test
public void matches() throws Exception {
ISimpleMXBean simpleBean = getSimpleMXBean();
simpleBean.setStringValue("bogus");
Thread.sleep(600);
simpleBean.setStringValue("initial");
getMockFixture().waitForMessages();
getMockFixture().assertMessageReceived(new File("src/test/resources/monitor-consumer/stringMatches.xml"));
}
Aggregations