本文整理匯總了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();
}