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.gardena.internal;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
18 * The {@link GardenaSmartWebSocketListener} is called by the {@link GardenaSmartWebSocket} on new Events and if the
19 * {@link GardenaSmartWebSocket}
20 * closed the connection.
22 * @author Gerhard Riegler - Initial contribution
25 public interface GardenaSmartWebSocketListener {
27 * This method is called, when the evenRunner stops abnormally ({@code statuscode <> 1000}).
29 void onWebSocketClose(String id);
32 * This method is called when the Gardena websocket services throws an onError.
34 void onWebSocketError(String id);
37 * This method is called, whenever a new event comes from the Gardena service.
41 void onWebSocketMessage(String msg);