blob: 9ce84bebc381b175c09077a727ffed907ef2d0ea [file] [log] [blame]
jcc4a20a5f2015-04-30 15:43:39 +08001/*
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.net.tunnel;
17
18import java.util.Optional;
19
20import org.onosproject.net.Annotated;
21import org.onosproject.net.ElementId;
22import org.onosproject.net.NetworkResource;
23import org.onosproject.net.PortNumber;
24import org.onosproject.net.Provided;
25
26/**
27 * Generic representation of a logical port entity in a consistent way,
28 * it is used to identify e.g., ODUk timeSlot, WDM lambda, etc.
29 * It supports nested case.
30 */
31public interface OpticalTunnelEndPoint extends TunnelEndPoint, Annotated, Provided, NetworkResource {
32
33 /** Represents coarse tunnel point type classification. */
34 public enum Type {
35 /**
36 * Signifies optical data unit-based tunnel point.
37 */
38 TIMESLOT,
39
40 /**
41 * Signifies optical wavelength-based tunnel point.
42 */
43 LAMBDA
44 }
45
46 /**
47 * Returns the identifier.
48 *
49 * @return identifier
50 */
51 OpticalLogicId id();
52
53 /**
54 * Returns the parent network element to which this tunnel point belongs.
55 *
56 * @return parent network element
57 */
58 Optional<ElementId> elementId();
59
60 /**
61 * Returns the parent network port to which this tunnel point belongs, can not be be null.
62 *
63 * @return port number
64 */
65 Optional<PortNumber> portNumber();
66
67 /**
68 * Returns the parent tunnel point to which this tunnel point belongs, optional.
69 *
70 * @return parent tunnel point, if it is null, the parent is a physical port
71 */
72 Optional<OpticalTunnelEndPoint> parentPoint();
73
74 /**
75 * Indicates whether or not the port is global significant.
76 *
77 * @return true if the port is global significant
78 */
79 boolean isGlobal();
80
81 /**
82 * Returns the tunnel point type.
83 *
84 * @return tunnel point type
85 */
86 Type type();
87}