tom | edf06bb | 2014-08-27 16:22:15 -0700 | [diff] [blame^] | 1 | package org.onlab.onos.net.link; |
| 2 | |
| 3 | import org.onlab.onos.net.DeviceId; |
| 4 | import org.onlab.onos.net.Link; |
| 5 | |
| 6 | import java.util.Set; |
| 7 | |
| 8 | /** |
| 9 | * Service for interacting with the inventory of infrastructure links. |
| 10 | */ |
| 11 | public 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 | } |