]> git.basschouten.com Git - openhab-addons.git/blob
1876bbb53e7b714d0ff467f71f40515108ee9872
[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.satel.internal.config;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17
18 /**
19  * The {@link Ethm1Config} contains configuration values for Satel ETHM-1 bridge.
20  *
21  * @author Krzysztof Goworek - Initial contribution
22  */
23 @NonNullByDefault
24 public class Ethm1Config extends SatelBridgeConfig {
25
26     public static final String HOST = "host";
27
28     private String host = "";
29     private int port;
30     private @Nullable String encryptionKey;
31
32     /**
33      * @return IP or hostname of the bridge
34      */
35     public String getHost() {
36         return host;
37     }
38
39     /**
40      * @return IP port the bridge listens to
41      */
42     public int getPort() {
43         return port;
44     }
45
46     /**
47      * @return key used to encrypt messages
48      */
49     public String getEncryptionKey() {
50         final String encryptionKey = this.encryptionKey;
51         return encryptionKey == null ? "" : encryptionKey;
52     }
53 }