Jian Li | a0bf459 | 2017-02-03 17:43:21 +0900 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2017-present Open Networking Foundation |
Jian Li | a0bf459 | 2017-02-03 17:43:21 +0900 | [diff] [blame] | 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 | */ |
| 16 | package org.onosproject.mapping; |
| 17 | |
Jian Li | 0e09eaa | 2017-02-14 02:01:18 +0900 | [diff] [blame] | 18 | import org.onosproject.mapping.addresses.MappingAddress; |
Jian Li | 136fd6c | 2017-02-10 14:54:59 +0900 | [diff] [blame] | 19 | |
Jian Li | a0bf459 | 2017-02-03 17:43:21 +0900 | [diff] [blame] | 20 | /** |
Jian Li | 136fd6c | 2017-02-10 14:54:59 +0900 | [diff] [blame] | 21 | * Abstraction of network mapping key. |
Jian Li | a0bf459 | 2017-02-03 17:43:21 +0900 | [diff] [blame] | 22 | */ |
| 23 | public interface MappingKey { |
Jian Li | 136fd6c | 2017-02-10 14:54:59 +0900 | [diff] [blame] | 24 | |
| 25 | /** |
| 26 | * Returns a mapping address. |
| 27 | * |
| 28 | * @return a mapping address |
| 29 | */ |
| 30 | MappingAddress address(); |
| 31 | |
| 32 | interface Builder { |
| 33 | |
| 34 | /** |
| 35 | * Specifies a mapping address. |
| 36 | * |
| 37 | * @param address mapping address |
| 38 | * @return a mapping key builder |
| 39 | */ |
| 40 | Builder withAddress(MappingAddress address); |
| 41 | |
| 42 | /** |
| 43 | * Builds an immutable mapping key. |
| 44 | * |
| 45 | * @return a mapping key |
| 46 | */ |
| 47 | MappingKey build(); |
| 48 | } |
Jian Li | a0bf459 | 2017-02-03 17:43:21 +0900 | [diff] [blame] | 49 | } |