[MDSAL-773] Generate Rpc specializations Created: 04/Oct/22 Updated: 13/Oct/22 Resolved: 13/Oct/22 |
|
| Status: | Resolved |
| Project: | mdsal |
| Component/s: | Binding codegen, Binding Spec |
| Affects Version/s: | None |
| Fix Version/s: | 11.0.0 |
| Type: | Task | Priority: | Highest |
| Reporter: | Robert Varga | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | pt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Description |
|
Define a replace for RpcService in a similar vain to what we do for Action, e.g.:
@FunctionalInterface public interface Rpc<I extends RpcInput, O extends RpcOutput> { /** * Invoke the Rpc. * * @param input Input argument * @return Future result of invocation * @throws NullPointerException if any of the arguments are null */ @CheckReturnValue @NonNull ListenableFuture<@NonNull RpcResult<@NonNull O>> invoke(@NonNull I input); } And generate its specializations (just like we do for Actions): @FunctionalInterface public interface Foo extends Rpc<FooInput, FooOutput> { // perhaps private with qname() method? public static final @NonNull QName QNAME = $YangModuleInfoImpl.qnameOf("foo-act"); }
|