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


Java BindingCodecTree.getSubtreeCodec方法代码示例

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


在下文中一共展示了BindingCodecTree.getSubtreeCodec方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: TableContext

import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTree; //导入方法依赖的package包/类
@SuppressWarnings({ "unchecked", "rawtypes" })
TableContext(final RIBSupport tableSupport, final YangInstanceIdentifier tableId, final BindingCodecTree tree) {
    this.tableSupport = requireNonNull(tableSupport);
    this.tableId = requireNonNull(tableId);
    final BindingCodecTreeNode tableCodecContext = tree.getSubtreeCodec(tableId);
    final BindingCodecTreeNode<? extends Route> routeListCodec = tableCodecContext
        .streamChild(Routes.class)
        .streamChild(this.tableSupport.routesCaseClass())
        .streamChild(this.tableSupport.routesContainerClass())
        .streamChild(this.tableSupport.routesListClass());

    this.attributesCodec = routeListCodec.streamChild(Attributes.class)
            .createCachingCodec(this.tableSupport.cacheableAttributeObjects());
    this.reachNlriCodec = tree.getSubtreeCodec(MP_REACH_NLRI_II)
            .createCachingCodec(this.tableSupport.cacheableNlriObjects());
    this.unreachNlriCodec = tree.getSubtreeCodec(MP_UNREACH_NLRI_II)
            .createCachingCodec(this.tableSupport.cacheableNlriObjects());
}
 
开发者ID:opendaylight,项目名称:bgpcep,代码行数:19,代码来源:TableContext.java

示例2: BmpRouterPeerImpl

import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTree; //导入方法依赖的package包/类
private BmpRouterPeerImpl(final DOMTransactionChain domTxChain, final YangInstanceIdentifier peersYangIId,
    final PeerId peerId, final RIBExtensionConsumerContext extensions, final PeerUpNotification peerUp,
    final BindingCodecTree tree) {
    this.domTxChain = requireNonNull(domTxChain);
    this.peerId = peerId;
    this.peerYangIId = YangInstanceIdentifier.builder(peersYangIId).nodeWithKey(Peer.QNAME, PEER_ID_QNAME,
            this.peerId.getValue()).build();
    this.sentOpenCodec = tree.getSubtreeCodec(SENT_OPEN_IID);
    this.receivedOpenCodec = tree.getSubtreeCodec(RECEIVED_OPEN_IID);

    final Set<TablesKey> peerTables = setPeerTables(peerUp.getReceivedOpen());
    final DOMDataWriteTransaction wTx = this.domTxChain.newWriteOnlyTransaction();
    wTx.put(LogicalDatastoreType.OPERATIONAL, this.peerYangIId, createPeerEntry(peerUp));
    wTx.submit();
    this.prePolicyWriter = BmpRibInWriter.create(this.peerYangIId.node(PrePolicyRib.QNAME).node(BMP_TABLES_QNAME),
            this.domTxChain, extensions, peerTables, tree);
    this.postPolicyWriter = BmpRibInWriter.create(this.peerYangIId.node(PostPolicyRib.QNAME).node(BMP_TABLES_QNAME),
            this.domTxChain, extensions, peerTables, tree);
}
 
开发者ID:opendaylight,项目名称:bgpcep,代码行数:20,代码来源:BmpRouterPeerImpl.java

示例3: onCodecTreeUpdated

import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTree; //导入方法依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public void onCodecTreeUpdated(final BindingCodecTree tree) {

    @SuppressWarnings("rawtypes")
    final BindingCodecTreeNode tableCodecContext = tree.getSubtreeCodec(TABLE_BASE_II);
    final BindingCodecTreeNode<? extends Route> routeListCodec = tableCodecContext
        .streamChild(Routes.class)
        .streamChild(this.ribSupport.routesCaseClass())
        .streamChild(this.ribSupport.routesContainerClass())
        .streamChild(this.ribSupport.routesListClass());

    this.attributesCodec = routeListCodec.streamChild(Attributes.class).createCachingCodec(this.cacheableAttributes);
    this.reachNlriCodec = tree.getSubtreeCodec(MP_REACH_NLRI_II).createCachingCodec(this.ribSupport.cacheableNlriObjects());
    this.unreachNlriCodec = tree.getSubtreeCodec(MP_UNREACH_NLRI_II).createCachingCodec(this.ribSupport.cacheableNlriObjects());
}
 
开发者ID:opendaylight,项目名称:bgpcep,代码行数:17,代码来源:CodecsImpl.java

示例4: getSubtreeCodec

import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTree; //导入方法依赖的package包/类
@Nonnull
public Map.Entry<InstanceIdentifier<?>, BindingCodecTreeNode<?>>
        getSubtreeCodec(final YangInstanceIdentifier domIdentifier) {

    final BindingCodecTree currentCodecTree = this.codecRegistry.getCodecContext();
    final InstanceIdentifier<?> bindingPath = this.codecRegistry.fromYangInstanceIdentifier(domIdentifier);
    Preconditions.checkArgument(bindingPath != null);
    /**
     * If we are able to deserialize YANG instance identifier, getSubtreeCodec must
     * return non-null value.
     */
    final BindingCodecTreeNode<?> codecContext = currentCodecTree.getSubtreeCodec(bindingPath);
    return new SimpleEntry<>(bindingPath, codecContext);
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:15,代码来源:BindingToNormalizedNodeCodec.java


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