]> git.basschouten.com Git - openhab-addons.git/blob
15a54fed7f3de5377ce3a6cfa2f86da96430dc76
[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.teleinfo.internal.serial;
14
15 import java.io.IOException;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.openhab.binding.teleinfo.internal.data.Frame;
19 import org.openhab.binding.teleinfo.internal.reader.io.serialport.InvalidFrameException;
20
21 /**
22  * The {@link TeleinfoReceiveThreadListener} interface defines all events pushed by a {@link TeleinfoReceiveThread}.
23  *
24  * @author Nicolas SIBERIL - Initial contribution
25  */
26 @NonNullByDefault
27 public interface TeleinfoReceiveThreadListener {
28
29     void onFrameReceived(final Frame frame);
30
31     void onInvalidFrameReceived(final TeleinfoReceiveThread receiveThread, final InvalidFrameException error);
32
33     void onSerialPortInputStreamIOException(final TeleinfoReceiveThread receiveThread, final IOException e);
34
35     void continueOnReadNextFrameTimeoutException();
36 }