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 FullLight#getState()}.
32 * The Tellstick bridge the changed device is connected to.
34 * The device which received the state update.
36 void onDeviceStateChanged(Bridge bridge, Device device, TellstickEvent deviceEvent);
39 * This method us called whenever a device is removed.
42 * The Tellstick bridge the removed device was connected to.
44 * The device which is removed.
46 void onDeviceRemoved(Bridge bridge, Device device);
49 * This method us called whenever a device is added.
52 * The Tellstick bridge the added device was connected to.
54 * The device which is added.
56 void onDeviceAdded(Bridge bridge, Device device);