BGPCEP-754: Start using default import policy
[bgpcep.git] / bgp / rib-impl / src / main / java / org / opendaylight / protocol / bgp / rib / impl / spi / ImportPolicyPeerTracker.java
1 /*
2  * Copyright (c) 2016 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.protocol.bgp.rib.impl.spi;
10
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.PeerId;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.PeerRole;
13 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
14
15 /**
16  * Tracks import policy corresponding to a particular peer.
17  */
18 public interface ImportPolicyPeerTracker {
19
20     /**
21      * Invoked whenever a peer role changes.
22      *
23      * @param peerPath Peer's path
24      * @param role Peer's new role, null indicates the peer has disappeared.
25      */
26     void peerRoleChanged(YangInstanceIdentifier peerPath, PeerRole role);
27
28     AbstractImportPolicy policyFor(PeerId peerId);
29
30 }