]> git.basschouten.com Git - openhab-addons.git/blob
52bbf0fd9714eb1a41a9873518bbe596e4507d1b
[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.mqtt.handler;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17 import org.openhab.core.io.transport.mqtt.MqttBrokerConnectionConfig;
18
19 /**
20  * Holds the configuration of a {@link BrokerHandler} Thing. Parameters are inherited
21  * from {@link MqttBrokerConnectionConfig}, Additionally some
22  * reconnect and security related parameters are defined here.
23  *
24  * @author David Graeff - Initial contribution
25  */
26 @NonNullByDefault
27 public class BrokerHandlerConfig extends MqttBrokerConnectionConfig {
28     public @Nullable Integer reconnectTime;
29     public @Nullable Integer timeoutInMs;
30
31     // For more security, the following optional parameters can be altered
32
33     public boolean certificatepin = false;
34     public boolean publickeypin = false;
35     public String certificate = "";
36     public String publickey = "";
37
38     public boolean enableDiscovery = true;
39
40     // Birth message parameters
41     public @Nullable String birthTopic;
42     public @Nullable String birthMessage;
43     public Boolean birthRetain = true;
44
45     // Shutdown message parameters
46     public @Nullable String shutdownTopic;
47     public @Nullable String shutdownMessage;
48     public Boolean shutdownRetain = true;
49 }