tom | b36046e | 2014-08-27 00:22:24 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net; |
2 | |||||
3 | /** | ||||
4 | * Abstraction of a network port. | ||||
5 | */ | ||||
6 | public interface Port { | ||||
7 | |||||
tom | ca20e0c | 2014-09-03 23:22:24 -0700 | [diff] [blame] | 8 | /** |
tom | b36046e | 2014-08-27 00:22:24 -0700 | [diff] [blame] | 9 | * Returns the port number. |
10 | * | ||||
11 | * @return port number | ||||
12 | */ | ||||
13 | PortNumber number(); | ||||
14 | |||||
15 | /** | ||||
tom | ca20e0c | 2014-09-03 23:22:24 -0700 | [diff] [blame] | 16 | * Indicates whether or not the port is currently up and active. |
17 | * | ||||
18 | * @return true if the port is operational | ||||
19 | */ | ||||
20 | boolean isEnabled(); | ||||
21 | |||||
22 | /** | ||||
tom | 29df6f4 | 2014-09-05 08:14:14 -0700 | [diff] [blame] | 23 | * Returns the parent network element to which this port belongs. |
tom | b36046e | 2014-08-27 00:22:24 -0700 | [diff] [blame] | 24 | * |
25 | * @return parent network element | ||||
26 | */ | ||||
tom | 29df6f4 | 2014-09-05 08:14:14 -0700 | [diff] [blame] | 27 | Element element(); |
tom | b36046e | 2014-08-27 00:22:24 -0700 | [diff] [blame] | 28 | |
29 | // set of port attributes | ||||
30 | |||||
31 | } |