blob: fadecdbf44a193c746f159942872de52e4fceed2 [file] [log] [blame]
tomedf06bb2014-08-27 16:22:15 -07001package org.onlab.onos.net.link;
2
3import org.onlab.onos.net.DeviceId;
4import org.onlab.onos.net.Link;
5
6import java.util.Set;
7
8/**
9 * Service for interacting with the inventory of infrastructure links.
10 */
11public interface LinkService {
12
13 /**
14 * Returns a collection of all known infrastructure links.
15 *
16 * @return all infrastructure links
17 */
18 Iterable<Link> getLinks();
19
20 /**
21 * Returns set of all infrastructure links leading to and from the
22 * specified device.
23 *
24 * @param deviceId device identifier
25 * @return set of device links
26 */
27 Set<Link> getDeviceLinks(DeviceId deviceId);
28
29 /**
30 * Returns set of all infrastructure links leading from the specified device.
31 *
32 * @param deviceId device identifier
33 * @return set of device egress links
34 */
35 Set<Link> getDeviceEgressLinks(DeviceId deviceId);
36
37 /**
38 * Returns set of all infrastructure links leading to the specified device.
39 *
40 * @param deviceId device identifier
41 * @return set of device ingress links
42 */
43 Set<Link> getDeviceInressLinks(DeviceId deviceId);
44
45 /**
46 * Adds the specified link listener.
47 *
48 * @param listener link listener
49 */
50 void addListener(LinkListener listener);
51
52 /**
53 * Removes the specified link listener.
54 *
55 * @param listener link listener
56 */
57 void removeListener(LinkListener listener);
58
59}