blob: c91ee77bcb21de30fccf28e4354c7c4e816c96d7 [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2014-present Open Networking Foundation
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07003 *
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 */
Brian O'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.net.link;
tom61359e92014-09-16 15:50:27 -070017
alshabibb5522ff2014-09-29 19:20:00 -070018import java.util.Set;
19
Brian O'Connorabafb502014-12-02 22:26:20 -080020import org.onosproject.net.ConnectPoint;
21import org.onosproject.net.DeviceId;
22import org.onosproject.net.Link;
23import org.onosproject.net.Link.State;
Yuta HIGUCHIf1f2ac02014-11-26 14:02:22 -080024
Yuta HIGUCHIf1f2ac02014-11-26 14:02:22 -080025import com.google.common.collect.FluentIterable;
tom61359e92014-09-16 15:50:27 -070026
tom61359e92014-09-16 15:50:27 -070027/**
28 * Test adapter for link service.
29 */
30public class LinkServiceAdapter implements LinkService {
31 @Override
32 public int getLinkCount() {
33 return 0;
34 }
35
36 @Override
37 public Iterable<Link> getLinks() {
38 return null;
39 }
40
41 @Override
Yuta HIGUCHIf1f2ac02014-11-26 14:02:22 -080042 public Iterable<Link> getActiveLinks() {
43 return FluentIterable.from(getLinks())
Sho SHIMIZU74626412015-09-11 11:46:27 -070044 .filter(input -> input.state() == State.ACTIVE);
Yuta HIGUCHIf1f2ac02014-11-26 14:02:22 -080045 }
46
47 @Override
tom61359e92014-09-16 15:50:27 -070048 public Set<Link> getDeviceLinks(DeviceId deviceId) {
49 return null;
50 }
51
52 @Override
53 public Set<Link> getDeviceEgressLinks(DeviceId deviceId) {
54 return null;
55 }
56
57 @Override
58 public Set<Link> getDeviceIngressLinks(DeviceId deviceId) {
59 return null;
60 }
61
62 @Override
63 public Set<Link> getLinks(ConnectPoint connectPoint) {
64 return null;
65 }
66
67 @Override
68 public Set<Link> getEgressLinks(ConnectPoint connectPoint) {
69 return null;
70 }
71
72 @Override
73 public Set<Link> getIngressLinks(ConnectPoint connectPoint) {
74 return null;
75 }
76
77 @Override
78 public Link getLink(ConnectPoint src, ConnectPoint dst) {
79 return null;
80 }
81
82 @Override
83 public void addListener(LinkListener listener) {
84 }
85
86 @Override
87 public void removeListener(LinkListener listener) {
88 }
89
tom61359e92014-09-16 15:50:27 -070090}