org.apache.camel.api.management.mbean.ManagedCamelContextMBean

Here are the examples of the java api class org.apache.camel.api.management.mbean.ManagedCamelContextMBean taken from open source projects.

1. ManagedCamelContextTest#testManagedCamelContextClient()

Project: camel
File: ManagedCamelContextTest.java
public void testManagedCamelContextClient() throws Exception {
    // JMX tests dont work well on AIX CI servers (hangs them)
    if (isPlatform("aix")) {
        return;
    }
    ManagedCamelContextMBean client = context.getManagedCamelContext();
    assertNotNull(client);
    assertEquals("camel-1", client.getCamelId());
    assertEquals("Started", client.getState());
    List<String> names = client.findComponentNames();
    assertNotNull(names);
    assertTrue(names.contains("mock"));
}

2. ManagedCamelContextNewProxyTest#testNewProxy()

Project: camel
File: ManagedCamelContextNewProxyTest.java
public void testNewProxy() throws Exception {
    // JMX tests dont work well on AIX CI servers (hangs them)
    if (isPlatform("aix")) {
        return;
    }
    MBeanServer mbeanServer = getMBeanServer();
    ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=context,name=\"camel-1\"");
    ManagedCamelContextMBean proxy = JMX.newMBeanProxy(mbeanServer, on, ManagedCamelContextMBean.class);
    assertNotNull(proxy);
}