当前位置: 首页>>代码示例>>Java>>正文


Java RuntimeBeanRegistratorAwareModule类代码示例

本文整理汇总了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);
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:18,代码来源:DependencyResolverManager.java

示例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;
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:43,代码来源:TemplateFactory.java


注:本文中的org.opendaylight.controller.config.api.RuntimeBeanRegistratorAwareModule类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。