2 * Copyright (c) 2010-2022 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.wlanthermo.internal;
16 import java.net.URISyntaxException;
18 import org.eclipse.jdt.annotation.NonNullByDefault;
21 * The {@link WlanThermoConfiguration} class contains fields mapping thing configuration parameters.
23 * @author Christian Schlipp - Initial contribution
26 public class WlanThermoConfiguration {
29 * IP Address of WlanThermo.
31 private String ipAddress = "";
36 private int pollingInterval = 10;
38 public String getIpAddress() {
42 public URI getUri(String path) throws URISyntaxException {
43 String uri = ipAddress;
44 if (!uri.startsWith("http://")) {
45 uri = "http://" + uri;
48 if (!path.startsWith("/") && !uri.endsWith("/")) {
56 public URI getUri() throws URISyntaxException {
60 public void setIpAddress(String ipAddress) {
61 this.ipAddress = ipAddress;
64 public int getPollingInterval() {
65 return pollingInterval;
68 public void setPollingInterval(int pollingInterval) {
69 this.pollingInterval = pollingInterval;