gpt4 book ai didi

java - ODL Fluorine RpcRegistration 已弃用 现在如何注册 RPC?

转载 作者:行者123 更新时间:2023-12-02 10:23:08 27 4
gpt4 key购买 nike

我正在尝试在新的 ODL 版本上为氟创建一个功能。在这个新版本中,软件包:org.opendaylight.mdsal.binding.api.RpcProviderService.RpcRegistration已弃用。当转到该包的文档时,它引用了一个新包:org.opendaylight.mdsal.binding.api.RpcProviderService有一个功能 registerRpcImplementation(Class<S> type, T implementation)

这太棒了;但是,我找不到有关如何实际实现该功能的记录示例。以下是 RPC 的注册方式:

    private RpcRegistration<NewFeatureService> serviceRegistration;

public void init()
{
serviceRegistration = rpcProviderRegistry.addRpcImplementation(NewFeatureService.class, new NewFeatureImpl(dataBroker, ds, props));
}

缺少这个新库/包的文档的另一个问题是,由于 RpcRegistration 包的更改,新功能的 blueprint.xml 也发生了更改。

有没有人在 Fluorine 上实现了新功能,或者有一个示例来展示这是如何实现的?

我希望这并不太难,我只是还没有看到如何正确执行此操作的示例(即使在官方维基上)。

最佳答案

mdsal RpcProviderService 上的方法基本相同,只是名称改为 registerRpcImplementation,返回类型为 ObjectRegistration,这也是 RpcRegistration 的基接口(interface)。

关于java - ODL Fluorine RpcRegistration 已弃用 现在如何注册 RPC?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54184108/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com