Merge "Fix issues related to checkstyle enforcement"
[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(
29             KeyedInstanceIdentifier<I, K> itemPath, I itemBody);
30
31     /**
32      * react upon item removed event.
33      *
34      * @param itemPath keyed path in DS
35      */
36     <I extends Identifiable<K> & DataObject, K extends Identifier<I>> void onRemoved(
37             KeyedInstanceIdentifier<I, K> itemPath);
38
39     /**
40      * react upon item updated event.
41      *
42      * @param itemPath keyed path in DS
43      * @param itemBody item body
44      */
45
46     <I extends Identifiable<K> & DataObject, K extends Identifier<I>> void onUpdated(
47             KeyedInstanceIdentifier<I, K> itemPath, I itemBody);
48 }