blob: e2da4a177d28f7665d392f2d0e9be2b563ea0929 [file] [log] [blame]
tomb36046e2014-08-27 00:22:24 -07001package org.onlab.onos.net;
2
Jonathan Hartb79d6412014-09-19 11:24:06 -07003
tomb36046e2014-08-27 00:22:24 -07004/**
5 * Abstraction of a network port.
6 */
tom3ea11252014-10-02 04:32:26 -07007public interface Port extends Annotated {
tomb36046e2014-08-27 00:22:24 -07008
tomca20e0c2014-09-03 23:22:24 -07009 /**
tomb36046e2014-08-27 00:22:24 -070010 * Returns the port number.
11 *
12 * @return port number
13 */
14 PortNumber number();
15
16 /**
tomca20e0c2014-09-03 23:22:24 -070017 * 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 /**
tom29df6f42014-09-05 08:14:14 -070024 * Returns the parent network element to which this port belongs.
tomb36046e2014-08-27 00:22:24 -070025 *
26 * @return parent network element
27 */
tom29df6f42014-09-05 08:14:14 -070028 Element element();
tomb36046e2014-08-27 00:22:24 -070029
30 // set of port attributes
31
tomb36046e2014-08-27 00:22:24 -070032}