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.livisismarthome.internal.listener;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
18 * The {@link EventListener} is called by the {@link org.openhab.binding.livisismarthome.internal.LivisiWebSocket} on
19 * new Events and if the {@link org.openhab.binding.livisismarthome.internal.LivisiWebSocket}
20 * closed the connection.
22 * @author Oliver Kuhl - Initial contribution
25 public interface EventListener {
28 * This method is called, whenever a new event comes from the LIVISI SmartHome service (like a device change for
33 void onEvent(String msg);
36 * This method is called when the LIVISI SmartHome websocket services throws an onError.
38 * @param cause cause / throwable
40 void onError(Throwable cause);
43 * This method is called, when the evenRunner stops abnormally (statuscode <> 1000).
45 void connectionClosed();