2 * Copyright (c) 2010-2023 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.network.internal;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
19 * The {@link SpeedTestConfiguration} is the class used to match the
20 * thing configuration.
22 * @author Gaƫl L'hopital - Initial contribution
25 public class SpeedTestConfiguration {
26 public int refreshInterval = 20;
27 public int initialDelay = 5;
28 public int uploadSize = 1000000;
29 public int maxTimeout = 3;
30 private @Nullable String url;
31 private @Nullable String fileName;
33 public @Nullable String getUploadURL() {
34 String localUrl = url;
35 if (localUrl != null) {
36 localUrl += localUrl.endsWith("/") ? "" : "/";
41 public @Nullable String getDownloadURL() {
42 String result = getUploadURL();
43 if (result != null && fileName != null) {