]> git.basschouten.com Git - openhab-addons.git/blob
7067e93086b890bc04f9a0f08800816cb8084bd1
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.velux.internal.bridge.common;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 /**
18  * Protocol independent bridge communication supported by the Velux bridge.
19  * <P>
20  * Common Message semantic: Communication with the bridge and (optionally) storing returned information within the class
21  * itself.
22  * <P>
23  * As 2nd level interface it defines the methods to help in sending a query and
24  * processing the received answer.
25  * <P>
26  * Methods in this interface for the appropriate interaction:
27  * <UL>
28  * <LI>{@link name} to return the name of the interaction for human interface.</LI>
29  * <LI>{@link isCommunicationSuccessful} to signal the success of the interaction (only available
30  * after storing the response).</LI>
31  * </UL>
32  *
33  * @author Guenther Schreiner - Initial contribution.
34  */
35 @NonNullByDefault
36 public interface BridgeCommunicationProtocol {
37
38     /**
39      * Returns the name of this communication pair.
40      *
41      * @return name of the communication pair for human beings.
42      */
43     public String name();
44
45     /**
46      * Returns the communication status included within the response message.
47      *
48      * @return true if the communication was successful, and false otherwise.
49      */
50     public boolean isCommunicationSuccessful();
51 }