Uploaded image for project: 'mdsal'
  1. mdsal
  2. MDSAL-773

Generate Rpc specializations

XMLWordPrintable

      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");
      } 
      

       

            rovarga Robert Varga
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: