jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Laboratory |
jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [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 | */ |
Thomas Vachuska | bf916ea | 2015-05-20 18:24:34 -0700 | [diff] [blame] | 16 | |
| 17 | package org.onosproject.incubator.net.tunnel; |
jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [diff] [blame] | 18 | |
| 19 | import java.util.Optional; |
| 20 | |
Brian O'Connor | 2bed5ce | 2015-06-25 15:10:28 -0400 | [diff] [blame] | 21 | import com.google.common.annotations.Beta; |
jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [diff] [blame] | 22 | import org.onosproject.net.Annotated; |
| 23 | import org.onosproject.net.ElementId; |
| 24 | import org.onosproject.net.NetworkResource; |
| 25 | import org.onosproject.net.PortNumber; |
| 26 | import org.onosproject.net.Provided; |
| 27 | |
| 28 | /** |
| 29 | * Generic representation of a logical port entity in a consistent way, |
| 30 | * it is used to identify e.g., ODUk timeSlot, WDM lambda, etc. |
| 31 | * It supports nested case. |
| 32 | */ |
Brian O'Connor | 2bed5ce | 2015-06-25 15:10:28 -0400 | [diff] [blame] | 33 | @Beta |
jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [diff] [blame] | 34 | public interface OpticalTunnelEndPoint extends TunnelEndPoint, Annotated, Provided, NetworkResource { |
| 35 | |
| 36 | /** Represents coarse tunnel point type classification. */ |
| 37 | public enum Type { |
| 38 | /** |
| 39 | * Signifies optical data unit-based tunnel point. |
| 40 | */ |
| 41 | TIMESLOT, |
| 42 | |
| 43 | /** |
| 44 | * Signifies optical wavelength-based tunnel point. |
| 45 | */ |
| 46 | LAMBDA |
| 47 | } |
| 48 | |
| 49 | /** |
| 50 | * Returns the identifier. |
| 51 | * |
| 52 | * @return identifier |
| 53 | */ |
| 54 | OpticalLogicId id(); |
| 55 | |
| 56 | /** |
| 57 | * Returns the parent network element to which this tunnel point belongs. |
| 58 | * |
| 59 | * @return parent network element |
| 60 | */ |
| 61 | Optional<ElementId> elementId(); |
| 62 | |
| 63 | /** |
| 64 | * Returns the parent network port to which this tunnel point belongs, can not be be null. |
| 65 | * |
| 66 | * @return port number |
| 67 | */ |
| 68 | Optional<PortNumber> portNumber(); |
| 69 | |
| 70 | /** |
| 71 | * Returns the parent tunnel point to which this tunnel point belongs, optional. |
| 72 | * |
| 73 | * @return parent tunnel point, if it is null, the parent is a physical port |
| 74 | */ |
| 75 | Optional<OpticalTunnelEndPoint> parentPoint(); |
| 76 | |
| 77 | /** |
| 78 | * Indicates whether or not the port is global significant. |
| 79 | * |
| 80 | * @return true if the port is global significant |
| 81 | */ |
| 82 | boolean isGlobal(); |
| 83 | |
| 84 | /** |
| 85 | * Returns the tunnel point type. |
| 86 | * |
| 87 | * @return tunnel point type |
| 88 | */ |
| 89 | Type type(); |
| 90 | } |