Merge "Bring features/neutron into the same parent dir as everything else"
[controller.git] / opendaylight / md-sal / sal-dom-api / src / main / java / org / opendaylight / controller / md / sal / dom / api / DOMRpcImplementation.java
1 /*
2  * Copyright (c) 2015 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 package org.opendaylight.controller.md.sal.dom.api;
9
10 import com.google.common.util.concurrent.CheckedFuture;
11 import javax.annotation.Nonnull;
12 import javax.annotation.Nullable;
13 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
14
15 /**
16  * Interface implemented by an individual RPC implementation. This API allows for dispatch
17  * implementations, e.g. an individual object handling a multitude of RPCs.
18  */
19 public interface DOMRpcImplementation {
20     /**
21      * Initiate invocation of the RPC. Implementations of this method are
22      * expected to not block on external resources.
23      *
24      * @param rpc RPC identifier which was invoked
25      * @param input Input arguments, null if the RPC does not take any.
26      * @return A {@link CheckedFuture} which will return either a result structure,
27      *         or report a subclass of {@link DOMRpcException} reporting a transport
28      *         error.
29      */
30     @Nonnull CheckedFuture<DOMRpcResult, DOMRpcException> invokeRpc(@Nonnull DOMRpcIdentifier rpc, @Nullable NormalizedNode<?, ?> input);
31 }