]> git.basschouten.com Git - openhab-addons.git/blob
d8287da765fd77031955cf0675def3cf48835bd6
[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.network.internal;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 /**
18  * Implement this callback to be notified of a presence detection result.
19  *
20  * @author David Graeff - Initial contribution
21  */
22 @NonNullByDefault
23 public interface PresenceDetectionListener {
24
25     /**
26      * This method is called by the {@see PresenceDetectionService}
27      * if a device is deemed to be reachable.
28      *
29      * @param value The partial result of the presence detection process.
30      *            A partial result always means that the device is reachable, but not
31      *            all methods have returned a value yet.
32      */
33     public void partialDetectionResult(PresenceDetectionValue value);
34
35     /**
36      * This method is called by the {@see PresenceDetectionService}
37      * if a new device state is known. The device might be reachable by different means
38      * or unreachable.
39      *
40      * @param value The final result of the presence detection process.
41      */
42     public void finalDetectionResult(PresenceDetectionValue value);
43 }