]> git.basschouten.com Git - openhab-addons.git/blob
6c15ce1e5429bc348cf0559b790e36da1a8a22f8
[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.io.neeo.internal.discovery;
14
15 import java.net.InetAddress;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.openhab.io.neeo.internal.models.NeeoSystemInfo;
19
20 /**
21  * The interface defines the contract for discovery notifications
22  *
23  * @author Tim Roberts - Initial Contribution
24  */
25 @NonNullByDefault
26 public interface DiscoveryListener {
27
28     /**
29      * Notification that a new brain was discovered
30      *
31      * @param brainSysInfo the non-null brain system information
32      * @param ipAddress the ip address of the brain
33      */
34     void discovered(NeeoSystemInfo brainSysInfo, InetAddress ipAddress);
35
36     /**
37      * Notification that a brain has a new IP Address
38      *
39      * @param brainSysInfo the non-null brain system information
40      * @param oldIpAddress the non-null old ip address of the brain
41      * @param newIpAddress the non-null new ip address of the brain
42      */
43     void updated(NeeoSystemInfo brainSysInfo, InetAddress oldIpAddress, InetAddress newIpAddress);
44
45     /**
46      * Notification that a brain was removed
47      *
48      * @param brainSysInfo the non-null brain system information
49      */
50     void removed(NeeoSystemInfo brainSysInfo);
51 }