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.teleinfo.internal.serial;
15 import java.io.IOException;
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;
22 * The {@link TeleinfoReceiveThreadListener} interface defines all events pushed by a {@link TeleinfoReceiveThread}.
24 * @author Nicolas SIBERIL - Initial contribution
27 public interface TeleinfoReceiveThreadListener {
29 void onFrameReceived(final Frame frame);
31 void onInvalidFrameReceived(final TeleinfoReceiveThread receiveThread, final InvalidFrameException error);
33 void onSerialPortInputStreamIOException(final TeleinfoReceiveThread receiveThread, final IOException e);
35 void continueOnReadNextFrameTimeoutException();