blob: dd8857a7bb60755c8a45bdd6f83a437e9e1d6f74 [file] [log] [blame]
Priyanka B0bee1f82015-10-13 15:39:49 +05301/*
2 * Copyright 2015 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.bgpio.protocol;
17
Shashikanth VH5dd8dbe2015-11-26 13:22:18 +053018import org.onosproject.bgpio.exceptions.BgpParseException;
19import org.onosproject.bgpio.protocol.linkstate.BgpNodeLSNlriVer4.ProtocolType;
Priyanka B0bee1f82015-10-13 15:39:49 +053020import org.onosproject.bgpio.types.RouteDistinguisher;
21
22/**
23 * Abstraction of an entity providing BGP-LS NLRI.
24 */
Shashikanth VH5dd8dbe2015-11-26 13:22:18 +053025public interface BgpLSNlri {
Priyanka B0bee1f82015-10-13 15:39:49 +053026 /**
27 * Returns NlriType of BGP-LS NLRI.
28 *
29 * @return NlriType of BGP-LS NLRI
30 */
31 NlriType getNlriType();
32
33 /**
34 * Returns Identifier in Nlri.
35 *
36 * @return Identifier in Nlri
37 */
38 long getIdentifier();
39
40 /**
41 * Returns Protocol Id in Nlri.
42 *
43 * @return Protocol Id in Nlri
Shashikanth VH5dd8dbe2015-11-26 13:22:18 +053044 * @throws BgpParseException while getting protocol ID
Priyanka B0bee1f82015-10-13 15:39:49 +053045 */
Shashikanth VH5dd8dbe2015-11-26 13:22:18 +053046 ProtocolType getProtocolId() throws BgpParseException;
Priyanka B0bee1f82015-10-13 15:39:49 +053047
48 /**
49 * Returns Route distinguisher in Nlri.
50 *
51 * @return Route distinguisher in Nlri
52 */
53 RouteDistinguisher getRouteDistinguisher();
Jonathan Hart317f4762015-11-09 16:05:36 -080054}