]> git.basschouten.com Git - openhab-addons.git/blob
95c87753a9dc39e16add60d6c787caf042f10709
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2021 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.atlona.internal;
14
15 import org.openhab.binding.atlona.internal.handler.AtlonaHandler;
16 import org.openhab.core.thing.ThingStatus;
17 import org.openhab.core.thing.ThingStatusDetail;
18 import org.openhab.core.types.State;
19
20 /**
21  *
22  * A callback to {@link AtlonaHandler} that can be used to update the status, properties and state of the thing.
23  *
24  * @author Tim Roberts - Initial contribution
25  */
26 public interface AtlonaHandlerCallback {
27     /**
28      * Callback to the {@link AtlonaHandler} to update the status of the thing.
29      *
30      * @param status a non-null {@link org.openhab.core.thing.ThingStatus}
31      * @param detail a non-null {@link org.openhab.core.thing.ThingStatusDetail}
32      * @param msg a possibly null, possibly empty message
33      */
34     void statusChanged(ThingStatus status, ThingStatusDetail detail, String msg);
35
36     /**
37      * Callback to the {@link AtlonaHandler} to update the state of an item
38      *
39      * @param channelId the non-null, non-empty channel id
40      * @param state the new non-null {@State}
41      */
42     void stateChanged(String channelId, State state);
43
44     /**
45      * Callback to the {@link AtlonaHandler} to update the property of a thing
46      *
47      * @param propertyName a non-null, non-empty property name
48      * @param propertyValue a non-null, possibly empty property value
49      */
50     void setProperty(String propertyName, String propertyValue);
51 }