本文整理汇总了Java中org.opendaylight.controller.config.api.RuntimeBeanRegistratorAwareModule类的典型用法代码示例。如果您正苦于以下问题:Java RuntimeBeanRegistratorAwareModule类的具体用法?Java RuntimeBeanRegistratorAwareModule怎么用?Java RuntimeBeanRegistratorAwareModule使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RuntimeBeanRegistratorAwareModule类属于org.opendaylight.controller.config.api包,在下文中一共展示了RuntimeBeanRegistratorAwareModule类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: put
import org.opendaylight.controller.config.api.RuntimeBeanRegistratorAwareModule; //导入依赖的package包/类
public void put(final ModuleIdentifier moduleIdentifier, final Module module, final ModuleFactory moduleFactory,
final ModuleInternalInfo maybeOldInternalInfo,
final TransactionModuleJMXRegistration transactionModuleJMXRegistration, final boolean isDefaultBean,
final BundleContext bundleContext) {
transactionStatus.checkNotCommitted();
Class<? extends Module> moduleClass = Module.class;
if (module instanceof RuntimeBeanRegistratorAwareModule) {
moduleClass = RuntimeBeanRegistratorAwareModule.class;
}
Module proxiedModule = Reflection.newProxy(moduleClass,
new ModuleInvocationHandler(deadlockMonitor, moduleIdentifier, module));
ModuleInternalTransactionalInfo moduleInternalTransactionalInfo = new ModuleInternalTransactionalInfo(
moduleIdentifier, proxiedModule, moduleFactory, maybeOldInternalInfo, transactionModuleJMXRegistration,
isDefaultBean, module, bundleContext);
modulesHolder.put(moduleInternalTransactionalInfo);
}
示例2: abstractModuleTemplateFromMbe
import org.opendaylight.controller.config.api.RuntimeBeanRegistratorAwareModule; //导入依赖的package包/类
public static AbstractModuleTemplate abstractModuleTemplateFromMbe(
final ModuleMXBeanEntry mbe) {
final AbstractModuleAttributesProcessor attrProcessor = new AbstractModuleAttributesProcessor(mbe.getAttributes());
final List<ModuleField> moduleFields = attrProcessor.getModuleFields();
final List<String> implementedIfcs = Lists.newArrayList(
mbe.getFullyQualifiedName(mbe.getMXBeanInterfaceName()));
for (final String implementedService : mbe.getProvidedServices().keySet()) {
implementedIfcs.add(implementedService);
}
boolean generateRuntime = false;
String registratorFullyQualifiedName = null;
if ((mbe.getRuntimeBeans() != null)
&& !mbe.getRuntimeBeans().isEmpty()) {
generateRuntime = true;
final RuntimeBeanEntry rootEntry = RuntimeRegistratorFtlTemplate
.findRoot(mbe.getRuntimeBeans());
registratorFullyQualifiedName = rootEntry
.getPackageName()
.concat(".")
.concat(RuntimeRegistratorFtlTemplate.getJavaNameOfRuntimeRegistrator(rootEntry));
implementedIfcs.add(RuntimeBeanRegistratorAwareModule.class
.getCanonicalName());
}
final List<String> extendedClasses = Collections.singletonList(AbstractModule.class.getCanonicalName() + "<" + mbe.getAbstractModuleName() + ">");
final AbstractModuleTemplate abstractModuleTemplate = new AbstractModuleTemplate(
getHeaderFromEntry(mbe), mbe.getPackageName(),
mbe.getAbstractModuleName(), extendedClasses, implementedIfcs, moduleFields,
attrProcessor.getMethods(), generateRuntime,
registratorFullyQualifiedName);
if (mbe.getNullableDescription() != null) {
abstractModuleTemplate.getAnnotations().add(
Annotation.createDescriptionAnnotation(mbe
.getNullableDescription()));
}
return abstractModuleTemplate;
}