Merge "BUG-2329 Add test for anyxmls inside rpc resonse for netcfon-connector"
[controller.git] / opendaylight / hosttracker_new / api / src / main / java / org / opendaylight / controller / hosttracker / IDeviceListener.java
1 /*
2  * Copyright (c) 2011 Big Switch Networks, Inc.
3  *
4  * Licensed under the Eclipse Public License, Version 1.0 (the
5  * "License"); you may not use this file except in compliance with the
6  * License. You may obtain a copy of the License at
7  *
8  *      http://www.eclipse.org/legal/epl-v10.html
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13  * implied. See the License for the specific language governing
14  * permissions and limitations under the License.
15  *
16  * This file incorporates work covered by the following copyright and
17  * permission notice:
18  *
19  *    Originally created by David Erickson, Stanford University
20  *
21  *    Licensed under the Apache License, Version 2.0 (the "License");
22  *    you may not use this file except in compliance with the
23  *    License. You may obtain a copy of the License at
24  *
25  *         http://www.apache.org/licenses/LICENSE-2.0
26  *
27  *    Unless required by applicable law or agreed to in writing,
28  *    software distributed under the License is distributed on an "AS
29  *    IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
30  *    express or implied. See the License for the specific language
31  *    governing permissions and limitations under the License.
32  */
33
34 package org.opendaylight.controller.hosttracker;
35
36 import org.opendaylight.controller.sal.utils.IListener;
37
38 /**
39  * Implementors of this interface can receive updates from DeviceManager about
40  * the state of devices under its control.
41  *
42  * @author David Erickson (daviderickson@cs.stanford.edu)
43  */
44 public interface IDeviceListener extends IListener<String> {
45     /**
46      * Called when a new Device is found
47      *
48      * @param device
49      *            the device that changed
50      */
51     public void deviceAdded(IDevice device);
52
53     /**
54      * Called when a Device is removed, this typically occurs when the port the
55      * Device is attached to goes down, or the switch it is attached to is
56      * removed.
57      *
58      * @param device
59      *            the device that changed
60      */
61     public void deviceRemoved(IDevice device);
62
63     /**
64      * Called when a Device has moved to a new location on the network. Note
65      * that either the switch or the port or both has changed.
66      *
67      * @param device
68      *            the device that changed
69      */
70     public void deviceMoved(IDevice device);
71
72     /**
73      * Called when a network address has been added or remove from a device
74      *
75      * @param device
76      *            the device that changed
77      */
78     public void deviceIPV4AddrChanged(IDevice device);
79
80     /**
81      * Called when a VLAN tag for the device has been added or removed
82      *
83      * @param device
84      *            the device that changed
85      */
86     public void deviceVlanChanged(IDevice device);
87 }