]> git.basschouten.com Git - openhab-addons.git/blob
11f35106097863234c17c8eb369827b6178da924
[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.logreader.internal.filereader.api;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17
18 /**
19  * Interface for file reader listeners.
20  *
21  * @author Pauli Anttila - Initial contribution
22  */
23 @NonNullByDefault
24 public interface FileReaderListener {
25
26     /**
27      * This method is called if the file is not found.
28      */
29     void fileNotFound();
30
31     /**
32      * This method is called if a file rotation is detected.
33      *
34      */
35     void fileRotated();
36
37     /**
38      * This method is called when new line is detected.
39      *
40      * @param line the line.
41      */
42     void handle(@Nullable String line);
43
44     /**
45      * This method is called when exception has occurred.
46      *
47      * @param ex the exception.
48      */
49     void handle(@Nullable Exception ex);
50 }