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.tradfri.internal;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.core.thing.ThingStatus;
17 import org.openhab.core.thing.ThingStatusDetail;
19 import com.google.gson.JsonElement;
22 * The {@link CoapCallback} is receives coap response data asynchronously.
24 * @author Kai Kreuzer - Initial contribution
27 public interface CoapCallback {
30 * This is being called, if new data is received from a CoAP request.
32 * @param data the received json structure
34 public void onUpdate(JsonElement data);
37 * Tells the listener to set the Thing status.
38 * Should usually be directly passed on to updateStatus() on the ThingHandler.
40 * @param status The thing status
41 * @param statusDetail the status detail
43 public void setStatus(ThingStatus status, ThingStatusDetail statusDetail);