Merge "Bug 1029: Remove dead code: samples/clustersession"
[controller.git] / opendaylight / adsal / sal / api / src / main / java / org / opendaylight / controller / sal / core / IContainerListener.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 /**
11  * @file   IContainerListener.java
12  *
13  * @brief  Set of methods needed to listen to changes in the Container
14  * configuration
15  *
16  * Set of methods needed to listen to changes in the Container
17  * configuration
18  *
19  *
20  */
21 package org.opendaylight.controller.sal.core;
22
23 /**
24  * The interface describes methods used to retrieve the status of a given
25  * Container
26  */
27 public interface IContainerListener {
28     /**
29      * Called to notify a change in the tag assigned to a switch
30      *
31      * @param containerName container for which the update has been raised
32      * @param n Node of the tag under notification
33      * @param oldTag previous version of the tag, this differ from the
34      * newTag only if the UpdateType is a modify
35      * @param newTag new value for the tag, different from oldTag only
36      * in case of modify operation
37      * @param t type of update
38      */
39     public void tagUpdated(String containerName, Node n, short oldTag,
40             short newTag, UpdateType t);
41
42     /**
43      * Notification raised when the container flow layout changes
44      *
45      * @param containerName
46      *            container for which the update has been raised
47      * @param previousFlow
48      *            previous value of the container flow
49      *            {@link org.opendaylight.controller.sal.core.ContainerFlow}
50      *            under update, differs from the currentFlow only and only if
51      *            it's an update operation
52      * @param currentFlow
53      *            current version of the container flow
54      *            {@link org.opendaylight.controller.sal.core.ContainerFlow}
55      *            differs from the previousFlow only in case of update
56      * @param t
57      *            type of update
58      *            {@link org.opendaylight.controller.sal.core.UpdateType}
59      */
60     public void containerFlowUpdated(String containerName,
61             ContainerFlow previousFlow, ContainerFlow currentFlow, UpdateType t);
62
63     /**
64      * Notification raised when a NodeConnector is added or removed in the
65      * container.
66      *
67      * @param containerName
68      *            container for which the update has been raised
69      * @param p
70      *            NodeConnector
71      *            {@link org.opendaylight.controller.sal.core.NodeConnector}
72      *            being updated
73      * @param t
74      *            type of modification
75      *            {@link org.opendaylight.controller.sal.core.UpdateType}, but
76      *            among the types the modify operation is not expected to be
77      *            raised because the nodeConnectors are anyway immutable so this
78      *            is only used to add/delete
79      */
80     public void nodeConnectorUpdated(String containerName, NodeConnector p,
81             UpdateType t);
82
83     /**
84      * Notification raised when the container mode has changed This notification
85      * is needed for some bundle in the default container to cleanup some HW
86      * state when switching from non-slicing to slicing case and vice-versa
87      *
88      * @param t
89      *            type of modification
90      *            {@link org.opendaylight.controller.sal.core.UpdateType}. ADDED
91      *            when first container is created, REMOVED when last container
92      *            is removed
93      */
94     public void containerModeUpdated(UpdateType t);
95 }