Mahesh Poojary S | ba82729 | 2016-05-09 11:31:12 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016-present 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 | */ |
Avantika-Huawei | 9e848e8 | 2016-09-01 12:12:42 +0530 | [diff] [blame] | 16 | package org.onosproject.pcelabelstore.api; |
Mahesh Poojary S | ba82729 | 2016-05-09 11:31:12 +0530 | [diff] [blame] | 17 | |
| 18 | import org.onosproject.net.DeviceId; |
| 19 | import org.onosproject.net.PortNumber; |
| 20 | import org.onosproject.incubator.net.resource.label.LabelResourceId; |
| 21 | |
| 22 | /** |
| 23 | * Abstraction of an entity providing LSP local label information. |
| 24 | */ |
| 25 | public 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 | } |