BUG-4084: Li:Save flows in operational based on barrier success
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / rpc / listener / ItemLifecycleListener.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.openflowplugin.api.openflow.rpc.listener;
10
11 import org.opendaylight.yangtools.yang.binding.DataObject;
12 import org.opendaylight.yangtools.yang.binding.Identifiable;
13 import org.opendaylight.yangtools.yang.binding.Identifier;
14 import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier;
15
16 /**
17  * Flow/group/meter lifecycle listener - aimed on rpc result approved by barrier message.
18  */
19 public interface ItemLifecycleListener {
20
21     /**
22      * react upon item added event
23      *
24      * @param itemPath keyed path in DS
25      * @param itemBody item body
26      */
27
28     <I extends Identifiable<K> & DataObject, K extends Identifier<I>> void onAdded(KeyedInstanceIdentifier<I, K> itemPath, I itemBody);
29
30     /**
31      * react upon item removed event
32      *
33      * @param itemPath keyed path in DS
34      */
35     <I extends Identifiable<K> & DataObject, K extends Identifier<I>> void onRemoved(KeyedInstanceIdentifier<I, K> itemPath);
36 }