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 | b36046e | 2014-08-27 00:22:24 -0700 | [diff] [blame] | 23 | * Returns the identifier of the network element to which this port belongs. |
| 24 | * |
| 25 | * @return parent network element |
| 26 | */ |
| 27 | Element parent(); |
| 28 | |
| 29 | // set of port attributes |
| 30 | |
| 31 | } |