Merge "Bug 6278: Switch to use odlparent's karaf-parent"
[openflowplugin.git] / applications / lldp-speaker / src / main / java / org / opendaylight / openflowplugin / applications / lldpspeaker / NodeConnectorEventsObserver.java
1 /*
2  * Copyright (c) 2014 Pacnet 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.applications.lldpspeaker;
10
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNodeConnector;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnector;
13 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
14
15 /**
16  * NodeConnectorEventsObserver can be added to NodeConnectorInventoryEventTranslator to receive events
17  * when node connector added or removed.
18  */
19 public interface NodeConnectorEventsObserver {
20     /**
21      * This method is called when new node connector is added to inventory or when existing
22      * node connector changed it's status to UP. This method can be called multiple times for
23      * the same creation event.
24      *
25      * @param nodeConnectorInstanceId Object that uniquely identify added node connector
26      * @param flowConnector object containing almost all of details about node connector
27      */
28     void nodeConnectorAdded(InstanceIdentifier<NodeConnector> nodeConnectorInstanceId,
29                                    FlowCapableNodeConnector flowConnector);
30
31     /**
32      * This method is called when some node connector is removed from inventory or when existing
33      * node connector changed it's status to DOWN. This method can be called multiple times for
34      * the same removal event.
35      * @param nodeConnectorInstanceId Object that uniquely identify added node connector
36      */
37     void nodeConnectorRemoved(InstanceIdentifier<NodeConnector> nodeConnectorInstanceId);
38 }