Merge "Bug 1027: Fixed generation of static QNAME field"
[yangtools.git] / yang / yang-common / src / main / java / org / opendaylight / yangtools / yang / common / RpcResult.java
1 /*
2  * Copyright (c) 2013 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.yangtools.yang.common;
9
10 import java.util.Collection;
11
12 /**
13  *
14  * Result of call to YANG enabled system.
15  *
16  *
17  * @param <T> Return type
18  */
19 public interface RpcResult<T> {
20
21     /**
22      * True if processing of request was successful
23      *
24      * @return true if processing was successful.
25      */
26     boolean isSuccessful();
27
28     /**
29      *
30      * Returns result of call or null if no result is available.
31      *
32      * @return result of call or null if no result is available.
33      *
34      */
35     T getResult();
36
37     /**
38      *
39      * Returns set of errors and warnings which occured during processing
40      * the request.
41      *
42      * @return
43      */
44     Collection<RpcError> getErrors();
45 }