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.modbus.discovery;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.core.config.discovery.DiscoveryResult;
19 * Listener for discovery results
21 * Each discovered thing should be supplied to the thingDiscovered
24 * When the discovery process has been finished then the discoveryFinished
25 * method should be called.
27 * @author Nagy Attila Gabor - initial contribution
31 public interface ModbusDiscoveryListener {
34 * Discovery participant should call this method when a new
35 * thing has been discovered
37 void thingDiscovered(DiscoveryResult result);
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.
44 void discoveryFinished();