58936888705d02e9f618d3b5f13a1bcfcbf5bafc
[controller.git] / opendaylight / md-sal / sal-dom-api / src / main / java / org / opendaylight / controller / md / sal / dom / api / DOMRpcResult.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 java.util.Collection;
11 import javax.annotation.Nonnull;
12 import javax.annotation.Nullable;
13 import org.opendaylight.yangtools.yang.common.RpcError;
14 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
15
16 /**
17  * Interface defining a result of an RPC call.
18  */
19 public interface DOMRpcResult {
20     /**
21      * Returns a set of errors and warnings which occurred during processing
22      * the call.
23      *
24      * @return a Collection of {@link RpcError}, guaranteed to be non-null. In case
25      *         no errors are reported, an empty collection is returned.
26      */
27     @Nonnull Collection<RpcError> getErrors();
28
29     /**
30      * Returns the value result of the call or null if no result is available.
31      *
32      * @return Invocation result, null if the operation has not produced a result. This might
33      *         be the case if the operation does not produce a result, or if it failed.
34      */
35     @Nullable NormalizedNode<?, ?> getResult();
36 }