]> git.basschouten.com Git - openhab-addons.git/blob
a3de3c28d9b956f9842f767d52a07a79bc18f022
[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.modbus.discovery;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.core.config.discovery.DiscoveryResult;
17
18 /**
19  * Listener for discovery results
20  *
21  * Each discovered thing should be supplied to the thingDiscovered
22  * method.
23  *
24  * When the discovery process has been finished then the discoveryFinished
25  * method should be called.
26  *
27  * @author Nagy Attila Gabor - initial contribution
28  *
29  */
30 @NonNullByDefault
31 public interface ModbusDiscoveryListener {
32
33     /**
34      * Discovery participant should call this method when a new
35      * thing has been discovered
36      */
37     void thingDiscovered(DiscoveryResult result);
38
39     /**
40      * This method should be called once the discovery has been finished
41      * or aborted by any error.
42      * It is important to call this even when there were no things discovered.
43      */
44     void discoveryFinished();
45 }