2 * Copyright (c) 2015 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
8 package org.opendaylight.mdsal.dom.api;
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;
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.
19 public interface DOMRpcImplementation {
21 * Initiate invocation of the RPC. Implementations of this method are
22 * expected to not block on external resources.
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
30 @Nonnull CheckedFuture<DOMRpcResult, DOMRpcException> invokeRpc(@Nonnull DOMRpcIdentifier rpc, @Nullable NormalizedNode<?, ?> input);