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.max.internal.handler;
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;
21 * The {@link DeviceStatusListener} is notified when a device status has changed
22 * or a device has been removed or added.
24 * @author Marcel Verpaalen - Initial contribution
27 public interface DeviceStatusListener {
30 * This method is called whenever the state of the given device has changed.
32 * @param bridge The MAX! Cube bridge the changed device is connected to
33 * @param device The device which received the state update
35 void onDeviceStateChanged(ThingUID bridge, Device device);
38 * This method is called whenever a device is removed.
40 * @param bridge The MAX! Cube bridge the removed device was connected to
41 * @param device The device which is removed
43 void onDeviceRemoved(MaxCubeBridgeHandler bridge, Device device);
46 * This method is called whenever a device is added.
48 * @param bridge The MAX! Cube bridge the added device was connected to
49 * @param device The device which is added
51 void onDeviceAdded(Bridge bridge, Device device);
54 * This method is called whenever a device config is updated.
56 * @param bridgeThe MAX! Cube bridge the device was connected to
57 * @param device The device which config is changed
59 void onDeviceConfigUpdate(Bridge bridge, Device device);