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


Java RpcRoutingStrategy.from方法代码示例

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


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

示例1: decomposeRpcService

import org.opendaylight.controller.md.sal.dom.broker.spi.rpc.RpcRoutingStrategy; //导入方法依赖的package包/类
static Collection<SchemaPath> decomposeRpcService(final Class<RpcService> service,
        final SchemaContext schemaContext, final Predicate<RpcRoutingStrategy> filter) {
    final QNameModule moduleName = BindingReflections.getQNameModule(service);
    final Module module = schemaContext.findModuleByNamespaceAndRevision(moduleName.getNamespace(),
            moduleName.getRevision());
    LOG.debug("Resolved service {} to module {}", service, module);

    final Collection<RpcDefinition> rpcs = module.getRpcs();
    final Collection<SchemaPath> ret = new ArrayList<>(rpcs.size());
    for (RpcDefinition rpc : rpcs) {
        final RpcRoutingStrategy strategy = RpcRoutingStrategy.from(rpc);
        if (filter.test(strategy)) {
            ret.add(rpc.getPath());
        }
    }

    return ret;
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:19,代码来源:RpcUtil.java

示例2: createRpcEntry

import org.opendaylight.controller.md.sal.dom.broker.spi.rpc.RpcRoutingStrategy; //导入方法依赖的package包/类
private static AbstractDOMRpcRoutingTableEntry createRpcEntry(final SchemaContext context, final SchemaPath key,
        final Map<YangInstanceIdentifier, List<DOMRpcImplementation>> implementations) {
    final RpcDefinition rpcDef = findRpcDefinition(context, key);
    if (rpcDef == null) {
        return new UnknownDOMRpcRoutingTableEntry(key, implementations);
    }

    final RpcRoutingStrategy strategy = RpcRoutingStrategy.from(rpcDef);
    if (strategy.isContextBasedRouted()) {
        return new RoutedDOMRpcRoutingTableEntry(rpcDef, YangInstanceIdentifier.of(strategy.getLeaf()),
            implementations);

    }

    return new GlobalDOMRpcRoutingTableEntry(rpcDef, implementations);
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:17,代码来源:DOMRpcRoutingTable.java

示例3: createStrategy

import org.opendaylight.controller.md.sal.dom.broker.spi.rpc.RpcRoutingStrategy; //导入方法依赖的package包/类
private RpcInvocationStrategy createStrategy(final Method method, final RpcDefinition schema) {
    final RpcRoutingStrategy strategy = RpcRoutingStrategy.from(schema);
    if (strategy.isContextBasedRouted()) {
        return new RoutedStrategy(schema.getPath(), method, strategy.getLeaf());
    }
    return new NonRoutedStrategy(schema.getPath());
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:8,代码来源:RpcServiceAdapter.java


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