Initial opendaylight infrastructure commit!!
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / topology / IListenTopoUpdates.java
1
2 /*
3  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
4  *
5  * This program and the accompanying materials are made available under the
6  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7  * and is available at http://www.eclipse.org/legal/epl-v10.html
8  */
9
10 package org.opendaylight.controller.sal.topology;
11
12 import java.util.Set;
13
14 import org.opendaylight.controller.sal.core.Edge;
15 import org.opendaylight.controller.sal.core.Property;
16 import org.opendaylight.controller.sal.core.UpdateType;
17
18 /**
19  * @file   IListenTopoUpdates.java
20  *
21  * @brief  Topology notifications provided by SAL toward the application
22  *
23  * For example an application that wants to keep up to date with the
24  * updates coming from SAL it will register in the OSGi service
25  * registry this interface (on a per-container base) and SAL will call it
26  * providing the update
27  */
28
29 /**
30  * Topology notifications provided by SAL toward the application
31  *
32  */
33 public interface IListenTopoUpdates {
34     /**
35      * Called to update on Edge in the topology graph
36      *
37      * @param e Edge being updated
38      * @param type Type of update
39      * @param props Properties of the edge, like BandWidth and/or Latency etc.
40      */
41     public void edgeUpdate(Edge e, UpdateType type, Set<Property> props);
42
43     /**
44      * Called when an Edge utilization is above the safety threshold
45      * configured on the controller
46      *
47      * @param edge The edge which bandwidth usage is above the safety level
48      */
49     public void edgeOverUtilized(Edge edge);
50
51     /**
52      * Called when the Edge utilization is back to normal, below the safety
53      * threshold level configured on the controller
54      *
55      * @param edge
56      */
57     public void edgeUtilBackToNormal(Edge edge);
58 }