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