Binding v2 runtime - adapters - impl - operations invoker
[mdsal.git] / binding2 / mdsal-binding2-spec / src / main / java / org / opendaylight / mdsal / binding / javav2 / spec / base / Rpc.java
1 /*
2  * Copyright (c) 2017 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.mdsal.binding.javav2.spec.base;
10
11 /**
12  *
13  * The "rpc" statement is used to define an RPC operation. The "rpc" statement
14  * defines an RPC node in the schema tree. Under the RPC node, a schema node
15  * with the name "input" and a schema node with the name "output" are also defined.
16  * The nodes "input" and "output" are defined in the module’s namespace.
17  *
18  */
19 @FunctionalInterface
20 public interface Rpc<I extends Input<I> & Instantiable<I>, O extends Output<O> & Instantiable<O>> extends Operation {
21
22     /**
23      * @param input Rpc input schema node
24      * @param callback on success/failure callback
25      */
26     void invoke(I input, RpcCallback<O> callback);
27 }