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.controller.md.sal.dom.api;
10 import com.google.common.util.concurrent.CheckedFuture;
11 import org.eclipse.jdt.annotation.NonNull;
12 import org.eclipse.jdt.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 * @deprecated Use {@link org.opendaylight.mdsal.dom.api.DOMRpcImplementation} instead.
22 public interface DOMRpcImplementation {
24 * Initiate invocation of the RPC. Implementations of this method are
25 * expected to not block on external resources.
27 * @param rpc RPC identifier which was invoked
28 * @param input Input arguments, null if the RPC does not take any.
29 * @return A {@link CheckedFuture} which will return either a result structure,
30 * or report a subclass of {@link DOMRpcException} reporting a transport
33 @NonNull CheckedFuture<DOMRpcResult, DOMRpcException> invokeRpc(@NonNull DOMRpcIdentifier rpc,
34 @Nullable NormalizedNode<?, ?> input);
37 * Return the relative invocation cost of this implementation. Default implementation return 0.
39 * @return Non-negative cost of invoking this implementation.
41 default long invocationCost() {