]> git.basschouten.com Git - openhab-addons.git/blob
1e8d1a35d60e589cfac5fd3ba0397e65457555fe
[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.max.internal.handler;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.max.internal.device.Device;
17 import org.openhab.core.thing.Bridge;
18 import org.openhab.core.thing.ThingUID;
19
20 /**
21  * The {@link DeviceStatusListener} is notified when a device status has changed
22  * or a device has been removed or added.
23  *
24  * @author Marcel Verpaalen - Initial contribution
25  */
26 @NonNullByDefault
27 public interface DeviceStatusListener {
28
29     /**
30      * This method is called whenever the state of the given device has changed.
31      *
32      * @param bridge The MAX! Cube bridge the changed device is connected to
33      * @param device The device which received the state update
34      */
35     void onDeviceStateChanged(ThingUID bridge, Device device);
36
37     /**
38      * This method is called whenever a device is removed.
39      *
40      * @param bridge The MAX! Cube bridge the removed device was connected to
41      * @param device The device which is removed
42      */
43     void onDeviceRemoved(MaxCubeBridgeHandler bridge, Device device);
44
45     /**
46      * This method is called whenever a device is added.
47      *
48      * @param bridge The MAX! Cube bridge the added device was connected to
49      * @param device The device which is added
50      */
51     void onDeviceAdded(Bridge bridge, Device device);
52
53     /**
54      * This method is called whenever a device config is updated.
55      *
56      * @param bridge The MAX! Cube bridge the device was connected to
57      * @param device The device which config is changed
58      */
59     void onDeviceConfigUpdate(Bridge bridge, Device device);
60 }