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.tellstick.internal.handler;
15 import org.openhab.core.thing.Bridge;
16 import org.tellstick.device.iface.Device;
17 import org.tellstick.device.iface.TellstickEvent;
20 * The {@link DeviceStatusListener} is notified when a device status has changed
21 * or a device has been removed or added.
23 * @author Jarle Hjortland - Initial contribution
25 public interface DeviceStatusListener {
28 * This method is called whenever the state of the given device has changed.
29 * The new state can be obtained by {@link TellstickNetDevice#getState()} /
30 * {@link TellstickLocalDeviceDTO#getState()}.
33 * The Tellstick bridge the changed device is connected to.
35 * The device which received the state update.
37 void onDeviceStateChanged(Bridge bridge, Device device, TellstickEvent deviceEvent);
40 * This method us called whenever a device is removed.
43 * The Tellstick bridge the removed device was connected to.
45 * The device which is removed.
47 void onDeviceRemoved(Bridge bridge, Device device);
50 * This method us called whenever a device is added.
53 * The Tellstick bridge the added device was connected to.
55 * The device which is added.
57 void onDeviceAdded(Bridge bridge, Device device);