]> git.basschouten.com Git - openhab-addons.git/blob
d55e8ee5424caca52af44f236c1c6352b2e29353
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 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.homeconnect.internal.client.listener;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.homeconnect.internal.client.model.Event;
17
18 /**
19  * {@link HomeConnectEventListener} inform about new events from Home Connect SSE interface.
20  *
21  * @author Jonas BrĂ¼stel - Initial contribution
22  */
23 @NonNullByDefault
24 public interface HomeConnectEventListener {
25
26     /**
27      * Inform listener about new event
28      *
29      * @param event appliance event listener
30      */
31     void onEvent(Event event);
32
33     /**
34      * If SSE connection was closed
35      */
36     default void onClosed() {
37     }
38
39     /**
40      * If SSE connection was closed due to rate limits
41      */
42     default void onRateLimitReached() {
43     }
44 }