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.atlona.internal;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17 import org.openhab.core.thing.ThingStatus;
18 import org.openhab.core.thing.ThingStatusDetail;
19 import org.openhab.core.types.State;
23 * A callback to {@link AtlonaHandler} that can be used to update the status, properties and state of the thing.
25 * @author Tim Roberts - Initial contribution
28 public interface AtlonaHandlerCallback {
30 * Callback to the {@link AtlonaHandler} to update the status of the thing.
32 * @param status a non-null {@link org.openhab.core.thing.ThingStatus}
33 * @param detail a non-null {@link org.openhab.core.thing.ThingStatusDetail}
34 * @param msg a possibly null, possibly empty message
36 void statusChanged(ThingStatus status, ThingStatusDetail detail, @Nullable String msg);
39 * Callback to the {@link AtlonaHandler} to update the state of an item
41 * @param channelId the non-null, non-empty channel id
42 * @param state the new non-null {@State}
44 void stateChanged(String channelId, State state);
47 * Callback to the {@link AtlonaHandler} to update the property of a thing
49 * @param propertyName a non-null, non-empty property name
50 * @param propertyValue a non-null, possibly empty property value
52 void setProperty(String propertyName, String propertyValue);