blob: 189edb8851825d95417bef05e421fd621cbef60c [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
18import org.onosproject.bgpio.exceptions.BGPParseException;
Jonathan Hart317f4762015-11-09 16:05:36 -080019import 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 */
25public interface BGPLSNlri {
26 /**
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
44 * @throws BGPParseException while getting protocol ID
45 */
46 PROTOCOLTYPE getProtocolId() throws BGPParseException;
47
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}