Maciej Skala | 3251a30 | 2019-03-26 09:16:55 +0100 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright 2019-present Open Networking Foundation |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with |
| 5 | * the License. You may obtain a copy of the License at |
| 6 | * |
| 7 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | * |
| 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on |
| 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the |
| 11 | * specific language governing permissions and limitations under the License. |
| 12 | */ |
| 13 | package org.onosproject.bgp.controller; |
| 14 | |
| 15 | import org.onosproject.bgpio.exceptions.BgpParseException; |
| 16 | import org.onosproject.bgpio.protocol.linkstate.BgpPrefixIPv4LSNlriVer4; |
| 17 | import org.onosproject.bgpio.protocol.linkstate.PathAttrNlriDetails; |
| 18 | |
| 19 | /** |
| 20 | * Allows for providers interested in bgp prefix events to be notified. |
| 21 | */ |
| 22 | public interface BgpPrefixListener { |
| 23 | |
| 24 | /** |
| 25 | * Notify that prefix was added or updated. |
| 26 | * |
| 27 | * @param prefixNlri BGP prefix NLRI |
| 28 | * @param details path attributes and NLRI information |
| 29 | * @throws BgpParseException BGP parse exception |
| 30 | */ |
| 31 | void addPrefix(BgpPrefixIPv4LSNlriVer4 prefixNlri, PathAttrNlriDetails details) throws BgpParseException; |
| 32 | |
| 33 | /** |
| 34 | * Notify that prefix was removed. |
| 35 | * |
| 36 | * @param prefixNlri BGP prefix NLRI |
| 37 | * @throws BgpParseException BGP parse exception |
| 38 | */ |
| 39 | void deletePrefix(BgpPrefixIPv4LSNlriVer4 prefixNlri) throws BgpParseException; |
| 40 | } |