blob: 37a5e5a872f9e781bc3b7e0a9eae5974571f80e4 [file] [log] [blame]
Aihua Guo1ce2dd12016-08-12 23:37:44 -04001/*
2 * Copyright 2016 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.tetopology.management.api.link;
17
Aihua Guo1ce2dd12016-08-12 23:37:44 -040018import org.onosproject.tetopology.management.api.KeyId;
Henry Yu4b4a7eb2016-11-09 20:07:53 -050019import org.onosproject.tetopology.management.api.node.NodeTpKey;
20
21import java.util.List;
Aihua Guo1ce2dd12016-08-12 23:37:44 -040022
23/**
24 * Abstraction of a base network link.
25 */
Henry Yu4b4a7eb2016-11-09 20:07:53 -050026public interface NetworkLink {
Aihua Guo1ce2dd12016-08-12 23:37:44 -040027
28 /**
Henry Yu4b4a7eb2016-11-09 20:07:53 -050029 * Returns the link identifier.
Aihua Guo1ce2dd12016-08-12 23:37:44 -040030 *
31 * @return link identifier
32 */
33 KeyId linkId();
34
35 /**
36 * Returns the link source termination point.
37 *
Henry Yu4b4a7eb2016-11-09 20:07:53 -050038 * @return source link termination point identifier
Aihua Guo1ce2dd12016-08-12 23:37:44 -040039 */
Henry Yu4b4a7eb2016-11-09 20:07:53 -050040 NodeTpKey source();
Aihua Guo1ce2dd12016-08-12 23:37:44 -040041
42 /**
43 * Returns the link destination termination point.
44 *
45 * @return destination link termination point id
46 */
Henry Yu4b4a7eb2016-11-09 20:07:53 -050047 NodeTpKey destination();
Aihua Guo1ce2dd12016-08-12 23:37:44 -040048
49 /**
Henry Yu4b4a7eb2016-11-09 20:07:53 -050050 * Returns the supporting link identifiers.
Aihua Guo1ce2dd12016-08-12 23:37:44 -040051 *
52 * @return list of the ids of the supporting links
53 */
Henry Yu4b4a7eb2016-11-09 20:07:53 -050054 List<NetworkLinkKey> supportingLinkIds();
Aihua Guo1ce2dd12016-08-12 23:37:44 -040055
56 /**
Henry Yu4b4a7eb2016-11-09 20:07:53 -050057 * Returns the link TE extension.
Aihua Guo1ce2dd12016-08-12 23:37:44 -040058 *
59 * @return TE link attributes
60 */
Henry Yu4b4a7eb2016-11-09 20:07:53 -050061 TeLink teLink();
Aihua Guo1ce2dd12016-08-12 23:37:44 -040062}