Switched BGPMessage concept to yangtools.binding.Notification.
[bgpcep.git] / bgp / parser-api / src / main / java / org / opendaylight / protocol / bgp / parser / BGPUpdateMessage.java
1 /*
2  * Copyright (c) 2013 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 package org.opendaylight.protocol.bgp.parser;
9
10 import java.util.Set;
11
12 import org.opendaylight.protocol.bgp.concepts.BGPObject;
13 import org.opendaylight.yangtools.yang.binding.Notification;
14
15 /**
16  * 
17  * BGP Update Message contains two sets of Objects, ones that have to be removed from the topology and ones that need to
18  * be added. Although it is restricted to have the same object in both sets, the implementation needs to handle this
19  * kind of situation. Therefore, first step is to remove objects, then add the other set.
20  * 
21  */
22 public interface BGPUpdateMessage extends BGPUpdateEvent, Notification {
23         /**
24          * Objects that are identified with Identifiers in this set, need to be removed from topology.
25          * 
26          * @return set of identifiers of objects to be removed
27          */
28         public Set<?> getRemovedObjects();
29
30         /**
31          * Set of objects that need to be added to the topology wrapped in BGPObject that includes the identifier and its
32          * attributes.
33          * 
34          * @return set of BGPObjects to be added
35          */
36         public Set<BGPObject> getAddedObjects();
37 }