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


Java BindingCodecTreeFactory类代码示例

本文整理汇总了Java中org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTreeFactory的典型用法代码示例。如果您正苦于以下问题:Java BindingCodecTreeFactory类的具体用法?Java BindingCodecTreeFactory怎么用?Java BindingCodecTreeFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


BindingCodecTreeFactory类属于org.opendaylight.mdsal.binding.dom.codec.api包,在下文中一共展示了BindingCodecTreeFactory类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: BmpDeployerDependencies

import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTreeFactory; //导入依赖的package包/类
public BmpDeployerDependencies(final DataBroker dataBroker, final DOMDataBroker domDataBroker,
        final RIBExtensionConsumerContext extensions, final BindingCodecTreeFactory codecTreeFactory,
        final SchemaContext schemaContext, final ClusterSingletonServiceProvider singletonProvider) {
    this.dataBroker = requireNonNull(dataBroker);
    this.domDataBroker = requireNonNull(domDataBroker);
    this.extensions = requireNonNull(extensions);
    this.tree = requireNonNull(codecTreeFactory).create(schemaContext);
    this.singletonProvider = requireNonNull(singletonProvider);
}
 
开发者ID:opendaylight,项目名称:bgpcep,代码行数:10,代码来源:BmpDeployerDependencies.java

示例2: RIBImpl

import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTreeFactory; //导入依赖的package包/类
public RIBImpl(final RibId ribId, final AsNumber localAs, final BgpId localBgpId,
        final ClusterIdentifier clusterId, final RIBExtensionConsumerContext extensions, final BGPDispatcher dispatcher,
        final BindingCodecTreeFactory codecFactory, final DOMDataBroker domDataBroker, final List<BgpTableType> localTables,
        @Nonnull final Map<TablesKey, PathSelectionMode> bestPathSelectionStrategies, final GeneratedClassLoadingStrategy classStrategy) {
    super(InstanceIdentifier.create(BgpRib.class).child(Rib.class, new RibKey(requireNonNull(ribId))),
            localBgpId, localAs);
    this.localAs = requireNonNull(localAs);
    this.bgpIdentifier = requireNonNull(localBgpId);
    this.dispatcher = requireNonNull(dispatcher);
    this.localTables = ImmutableSet.copyOf(localTables);
    this.localTablesKeys = new HashSet<>();
    this.domDataBroker = requireNonNull(domDataBroker);
    this.service = this.domDataBroker.getSupportedExtensions().get(DOMDataTreeChangeService.class);
    this.extensions = requireNonNull(extensions);
    this.codecsRegistry = CodecsRegistryImpl.create(codecFactory, classStrategy);
    this.ribContextRegistry = RIBSupportContextRegistryImpl.create(extensions, this.codecsRegistry);
    final InstanceIdentifierBuilder yangRibIdBuilder = YangInstanceIdentifier.builder().node(BgpRib.QNAME).node(Rib.QNAME);
    this.yangRibId = yangRibIdBuilder.nodeWithKey(Rib.QNAME, RIB_ID_QNAME, ribId.getValue()).build();
    this.bestPathSelectionStrategies = requireNonNull(bestPathSelectionStrategies);
    final ClusterIdentifier cId = clusterId == null ? new ClusterIdentifier(localBgpId) : clusterId;
    this.ribId = ribId;
    final PolicyDatabase policyDatabase = new PolicyDatabase(this.localAs.getValue(), localBgpId, cId);
    this.importPolicyPeerTracker = new ImportPolicyPeerTrackerImpl(policyDatabase);

    final ImmutableMap.Builder<TablesKey, ExportPolicyPeerTracker> exportPolicies = new ImmutableMap.Builder<>();
    for (final BgpTableType t : this.localTables) {
        final TablesKey key = new TablesKey(t.getAfi(), t.getSafi());
        this.localTablesKeys.add(key);
        exportPolicies.put(key, new ExportPolicyPeerTrackerImpl(policyDatabase, key));
    }
    this.exportPolicyPeerTrackerMap = exportPolicies.build();
}
 
开发者ID:opendaylight,项目名称:bgpcep,代码行数:33,代码来源:RIBImpl.java

示例3: RibImpl

import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTreeFactory; //导入依赖的package包/类
public RibImpl(final RIBExtensionConsumerContext contextProvider, final BGPDispatcher dispatcher,
        final BindingCodecTreeFactory codecTreeFactory, final DOMDataBroker domBroker,
        final DOMSchemaService domSchemaService) {
    this.extensions = contextProvider;
    this.dispatcher = dispatcher;
    this.codecTreeFactory = codecTreeFactory;
    this.domBroker = domBroker;
    this.domSchemaService = domSchemaService;
}
 
开发者ID:opendaylight,项目名称:bgpcep,代码行数:10,代码来源:RibImpl.java

示例4: createCodecFactory

import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTreeFactory; //导入依赖的package包/类
private static BindingCodecTreeFactory createCodecFactory(final ClassLoadingStrategy str, final SchemaContext ctx) {
    final DataObjectSerializerGenerator generator = StreamWriterGenerator
            .create(JavassistUtils.forClassPool(ClassPool.getDefault()));
    final BindingNormalizedNodeCodecRegistry codec = new BindingNormalizedNodeCodecRegistry(generator);
    codec.onBindingRuntimeContextUpdated(BindingRuntimeContext.create(str, ctx));
    return codec;
}
 
开发者ID:opendaylight,项目名称:bgpcep,代码行数:8,代码来源:AbstractRIBTestSetup.java

示例5: CodecsRegistryImpl

import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTreeFactory; //导入依赖的package包/类
private CodecsRegistryImpl(final BindingCodecTreeFactory codecFactory, final GeneratedClassLoadingStrategy strategy) {
    this.codecFactory = requireNonNull(codecFactory);
    this.classContext = requireNonNull(strategy);
}
 
开发者ID:opendaylight,项目名称:bgpcep,代码行数:5,代码来源:CodecsRegistryImpl.java

示例6: create

import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTreeFactory; //导入依赖的package包/类
static CodecsRegistryImpl create(final BindingCodecTreeFactory codecFactory, final GeneratedClassLoadingStrategy classStrategy) {
    return new CodecsRegistryImpl(codecFactory, classStrategy);
}
 
开发者ID:opendaylight,项目名称:bgpcep,代码行数:4,代码来源:CodecsRegistryImpl.java

示例7: setUp

import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTreeFactory; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
    MockitoAnnotations.initMocks(this);
    final DOMDataBroker domDataBroker = mock(DOMDataBroker.class);

    doReturn(this.wTx).when(this.dataBroker).newWriteOnlyTransaction();
    doReturn("mapping").when(this.tableTypeRegistry).toString();

    doReturn(null).when(domDataBroker).createTransactionChain(any());
    doReturn(Collections.singletonMap(DOMDataTreeChangeService.class, mock(DOMDataBrokerExtension.class)))
            .when(domDataBroker).getSupportedExtensions();

    doReturn(Optional.of(TABLE_TYPE)).when(this.tableTypeRegistry).getTableType(any());
    doReturn(Optional.of(TABLES_KEY)).when(this.tableTypeRegistry).getTableKey(any());
    Mockito.doNothing().when(this.registration).unregister();
    doReturn(this.registration).when(this.bundleContext).registerService(eq(InstanceType.RIB.getServices()), any()
            , any(Dictionary.class));
    doReturn(this.registration).when(this.bundleContext).registerService(eq(InstanceType.PEER.getServices()), any()
            , any(Dictionary.class));


    Mockito.doNothing().when(this.wTx).merge(any(LogicalDatastoreType.class), any(InstanceIdentifier.class),
            any(NetworkInstance.class));
    final CheckedFuture<?, ?> future = mock(CheckedFuture.class);
    doReturn(future).when(this.wTx).submit();
    Mockito.doNothing().when(future).addListener(any(), any());
    doReturn(this.dataTreeRegistration).when(this.dataBroker).registerDataTreeChangeListener(any(), any());
    Mockito.doNothing().when(this.dataTreeRegistration).close();

    final InstanceIdentifier<Bgp> bgpIID = InstanceIdentifier.create(NetworkInstances.class)
            .child(NetworkInstance.class, new NetworkInstanceKey(NETWORK_INSTANCE_NAME)).child(Protocols.class)
            .child(Protocol.class, new ProtocolKey(BGP.class, "bgp"))
            .augmentation(Protocol1.class).child(Bgp.class);

    doReturn(new DataTreeIdentifier<>(LogicalDatastoreType.OPERATIONAL, bgpIID))
            .when(this.modification).getRootPath();
    doReturn(this.dObject).when(this.modification).getRootNode();
    doReturn("bgpPeer").when(this.modification).toString();

    doReturn(Collections.singleton(this.dObject)).when(this.dObject).getModifiedChildren();
    doReturn("dObject").when(this.dObject).toString();

    final RIBExtensionConsumerContext extension = mock(RIBExtensionConsumerContext.class);
    doReturn(mock(GeneratedClassLoadingStrategy.class)).when(extension).getClassLoadingStrategy();

    final ClusterSingletonServiceRegistration serviceRegistration = mock(ClusterSingletonServiceRegistration.class);
    doReturn(serviceRegistration).when(this.singletonServiceProvider).registerClusterSingletonService(any());
    Mockito.doNothing().when(serviceRegistration).close();

    final DOMSchemaService schemaService = mock(DOMSchemaService.class);
    Mockito.doNothing().when(this.dataTreeRegistration).close();

    doReturn(this.dataTreeRegistration).when(schemaService).registerSchemaContextListener(any());

    final RibImpl ribImpl = new RibImpl(extension, mock(BGPDispatcher.class), mock(BindingCodecTreeFactory.class),
            domDataBroker, schemaService);
    doReturn(ribImpl).when(this.blueprintContainer).getComponentInstance(eq("ribImpl"));

    final BgpPeer bgpPeer = new BgpPeer(mock(RpcProviderRegistry.class));
    doReturn(bgpPeer).when(this.blueprintContainer).getComponentInstance(eq("bgpPeer"));
    this.collection = Collections.singleton(this.modification);
}
 
开发者ID:opendaylight,项目名称:bgpcep,代码行数:63,代码来源:BgpDeployerImplTest.java


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