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.innogysmarthome.internal.listener;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.innogysmarthome.internal.InnogyWebSocket;
19 * The {@link EventListener} is called by the {@link InnogyWebSocket} on new Events and if the {@link InnogyWebSocket}
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 innogy service (like a device change for example).
32 void onEvent(String msg);
35 * This method is called when the innogy websocket services throws an onError.
39 void onError(Throwable cause);
42 * This method is called, when the evenRunner stops abnormally (statuscode <> 1000).
44 void connectionClosed();