2 * Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
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
9 package org.opendaylight.mdsal.binding.javav2.spec.base;
13 * The "action" statement is used to define an operation connected to a
14 * specific container or list data node. The "action" statement defines
15 * an action node in the schema tree. Under the action node, a schema node
16 * with the name "input" and a schema node with the name "output" are also
17 * defined. The nodes "input" and "output" are defined in the module’s namespace.
19 * The difference between an action and an rpc is that an action is tied
20 * to a node in the datastore, whereas an rpc is not.
22 * Action replaces concept of routed RPC and comes up with implicit InstanceIdentifier
23 * context, whereas routed RPC defines explicit leaf for this purpose.
27 public interface Action<P extends TreeNode, I extends Input<I> & Instantiable<I>, O extends Output<O> & Instantiable<O>> {
30 * @param input Action input schema node
31 * @param ii implicit InstanceIdentifier connected to action, according to https://tools.ietf.org/html/rfc7950
32 * @param callback on success/failure callback
34 void invoke(I input, InstanceIdentifier<P> ii, RpcCallback<O> callback);