blob: 666449a258d429fb8380d84ec491d6a162a0cabc [file] [log] [blame]
Mahesh Poojary Sba827292016-05-09 11:31:12 +05301/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2016-present Open Networking Foundation
Mahesh Poojary Sba827292016-05-09 11:31:12 +05303 *
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 */
Avantika-Huawei9e848e82016-09-01 12:12:42 +053016package org.onosproject.pcelabelstore.api;
Mahesh Poojary Sba827292016-05-09 11:31:12 +053017
18import org.onosproject.net.DeviceId;
19import org.onosproject.net.PortNumber;
20import org.onosproject.incubator.net.resource.label.LabelResourceId;
21
22/**
23 * Abstraction of an entity providing LSP local label information.
24 */
25public interface LspLocalLabelInfo {
26
27 /**
28 * Returns device id.
29 *
30 * @return device id
31 */
32 DeviceId deviceId();
33
34 /**
35 * Returns in label id of a device.
36 *
37 * @return in label resource id
38 */
39 LabelResourceId inLabelId();
40
41 /**
42 * Returns out label id of a device.
43 *
44 * @return node out label resource id
45 */
46 LabelResourceId outLabelId();
47
48 /**
49 * Returns in port of an incoming label.
50 *
51 * @return in port
52 */
53 PortNumber inPort();
54
55 /**
56 * Returns next hop of an outgoing label.
57 *
58 * @return out port
59 */
60 PortNumber outPort();
61
62 /**
63 * LspLocalLabelInfo Builder.
64 */
65 interface Builder {
66
67 /**
68 * Returns builder object of a device id.
69 *
70 * @param id device id
71 * @return builder object of device id
72 */
73 Builder deviceId(DeviceId id);
74
75 /**
76 * Returns builder object of in label.
77 *
78 * @param id in label id
79 * @return builder object of in label id
80 */
81 Builder inLabelId(LabelResourceId id);
82
83 /**
84 * Returns builder object of out label.
85 *
86 * @param id out label id
87 * @return builder object of out label id
88 */
89 Builder outLabelId(LabelResourceId id);
90
91 /**
92 * Returns builder object of in port of an incoming label.
93 *
94 * @param port in port
95 * @return builder object of in port
96 */
97 Builder inPort(PortNumber port);
98
99 /**
100 * Returns builder object of next hop of an outgoing label.
101 *
102 * @param port out port
103 * @return builder object of out port
104 */
105 Builder outPort(PortNumber port);
106
107 /**
108 * Builds object of device local label info.
109 *
110 * @return object of device local label info.
111 */
112 LspLocalLabelInfo build();
113 }
114}