]> git.basschouten.com Git - openhab-addons.git/blob
59ad1ca35c7e17761a03b6eef7e1f2495fc7620d
[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.nest.internal.wwn.listener;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 /**
18  * Used to track incoming data for WWN things.
19  *
20  * @author Wouter Born - Initial contribution
21  */
22 @NonNullByDefault
23 public interface WWNThingDataListener<T> {
24
25     /**
26      * An initial value for the data was received or the value is send again due to a refresh.
27      *
28      * @param data the data
29      */
30     void onNewData(T data);
31
32     /**
33      * Existing data was updated to a new value.
34      *
35      * @param oldData the previous value
36      * @param data the current value
37      */
38     void onUpdatedData(T oldData, T data);
39
40     /**
41      * A Nest thing which previously had data is missing. E.g. it was removed from the account.
42      *
43      * @param nestId identifies the Nest thing
44      */
45     void onMissingData(String nestId);
46 }