本文整理汇总了Java中org.opendaylight.controller.config.manager.impl.jmx.HierarchicalRuntimeBeanRegistrationImpl类的典型用法代码示例。如果您正苦于以下问题:Java HierarchicalRuntimeBeanRegistrationImpl类的具体用法?Java HierarchicalRuntimeBeanRegistrationImpl怎么用?Java HierarchicalRuntimeBeanRegistrationImpl使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
HierarchicalRuntimeBeanRegistrationImpl类属于org.opendaylight.controller.config.manager.impl.jmx包,在下文中一共展示了HierarchicalRuntimeBeanRegistrationImpl类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createRoot
import org.opendaylight.controller.config.manager.impl.jmx.HierarchicalRuntimeBeanRegistrationImpl; //导入依赖的package包/类
private HierarchicalRuntimeBeanRegistrationImpl createRoot() throws Exception {
HierarchicalRuntimeBeanRegistrationImpl rootRegistration = tested.registerRoot(new TestingRuntimeBean());
ObjectName expectedON1 = ObjectNameUtil.createRuntimeBeanName(MODULE1, INSTANCE_NAME,
Maps.<String, String>newHashMap());
assertEquals(expectedON1, rootRegistration.getObjectName());
checkExists(rootRegistration.getObjectName());
return rootRegistration;
}
示例2: createAdditional
import org.opendaylight.controller.config.manager.impl.jmx.HierarchicalRuntimeBeanRegistrationImpl; //导入依赖的package包/类
private HierarchicalRuntimeBeanRegistration createAdditional(
final HierarchicalRuntimeBeanRegistrationImpl rootRegistration) throws Exception {
HierarchicalRuntimeBeanRegistrationImpl registration = rootRegistration.register(additionalKey, additionalValue,
new TestingRuntimeBean());
ObjectName expectedON1 = ObjectNameUtil.createRuntimeBeanName(MODULE1, INSTANCE_NAME, additionalProperties);
assertEquals(expectedON1, registration.getObjectName());
checkExists(registration.getObjectName());
return registration;
}
示例3: testCloseRegistrator
import org.opendaylight.controller.config.manager.impl.jmx.HierarchicalRuntimeBeanRegistrationImpl; //导入依赖的package包/类
@Test
public void testCloseRegistrator() throws Exception {
HierarchicalRuntimeBeanRegistrationImpl rootRegistration = createRoot();
HierarchicalRuntimeBeanRegistration childRegistration = createAdditional(rootRegistration);
tested.close();
checkNotExists(rootRegistration.getObjectName());
checkNotExists(childRegistration.getObjectName());
}
示例4: testRegistrationException
import org.opendaylight.controller.config.manager.impl.jmx.HierarchicalRuntimeBeanRegistrationImpl; //导入依赖的package包/类
@Test
public void testRegistrationException() throws Exception {
HierarchicalRuntimeBeanRegistrationImpl rootRegistration = createRoot();
try {
createRoot();
fail();
} catch (final IllegalStateException e) {
assertThat(e.getMessage(), containsString(rootRegistration.getObjectName().toString()));
assertThat(e.getMessage(), containsString("Could not register runtime bean"));
assertThat(e.getMessage(), containsString(moduleIdentifier.toString()));
}
}
示例5: testRegisterMBeanWithAdditionalProperties
import org.opendaylight.controller.config.manager.impl.jmx.HierarchicalRuntimeBeanRegistrationImpl; //导入依赖的package包/类
@Test
public void testRegisterMBeanWithAdditionalProperties() throws Exception {
HierarchicalRuntimeBeanRegistrationImpl rootRegistration = createRoot();
createAdditional(rootRegistration);
}
示例6: testCloseRegistration
import org.opendaylight.controller.config.manager.impl.jmx.HierarchicalRuntimeBeanRegistrationImpl; //导入依赖的package包/类
@Test
public void testCloseRegistration() throws Exception {
HierarchicalRuntimeBeanRegistrationImpl rootRegistration = createRoot();
rootRegistration.close();
checkNotExists(rootRegistration.getObjectName());
}
示例7: testRegistration_overrideType
import org.opendaylight.controller.config.manager.impl.jmx.HierarchicalRuntimeBeanRegistrationImpl; //导入依赖的package包/类
@Test(expected = IllegalArgumentException.class)
public void testRegistration_overrideType() throws Exception {
HierarchicalRuntimeBeanRegistrationImpl rootRegistration = createRoot();
rootRegistration.register("type", "xxx", new TestingRuntimeBean());
}
示例8: testIgnoringExceptionInClose
import org.opendaylight.controller.config.manager.impl.jmx.HierarchicalRuntimeBeanRegistrationImpl; //导入依赖的package包/类
@Test
public void testIgnoringExceptionInClose() throws Exception {
HierarchicalRuntimeBeanRegistrationImpl rootRegistration = createRoot();
platformMBeanServer.unregisterMBean(rootRegistration.getObjectName());
rootRegistration.close();
}