Add YangConstants.operation{Input,Output}QName()
[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  * Represents a general result of a call, request, or operation.
14  *
15  * @param <T> the result value type
16  */
17 public interface RpcResult<T> {
18
19     /**
20      * Returns whether or not processing of the call was successful.
21      *
22      * @return true if processing was successful, false otherwise.
23      */
24     boolean isSuccessful();
25
26     /**
27      * Returns the value result of the call or null if no result is available.
28      */
29     T getResult();
30
31     /**
32      * Returns a set of errors and warnings which occurred during processing
33      * the call.
34      *
35      * @return a Collection of {@link RpcError}
36      */
37     Collection<RpcError> getErrors();
38 }