]> git.basschouten.com Git - openhab-addons.git/blob
6869aeb4ca2d229f3ebd094e22030b3069dc8271
[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.io.hueemulation.internal.upnp;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 /**
18  * A self test report includes the tested address, a success flag and
19  * if the service at the given address is actually ours.
20  *
21  * @author David Graeff - Initial contribution
22  */
23 @NonNullByDefault
24 public class SelfTestReport {
25     public final String address;
26     public final boolean reachable;
27     public final boolean isOurs;
28
29     SelfTestReport(String address, boolean testReport, boolean isOurs) {
30         this.address = address;
31         this.reachable = testReport;
32         this.isOurs = isOurs;
33     }
34
35     /**
36      * A failed address is not reachable and not ours
37      */
38     public static SelfTestReport failed(String address) {
39         return new SelfTestReport(address, false, false);
40     }
41 }