blob: 7bf6af38b90e0993f5b709bbd3b5ae194ba4ba4e [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
2 * Copyright 2014 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
tomb36046e2014-08-27 00:22:24 -070016package org.onlab.onos.net;
17
Jonathan Hartb79d6412014-09-19 11:24:06 -070018
tomb36046e2014-08-27 00:22:24 -070019/**
20 * Abstraction of a network port.
21 */
tom3ea11252014-10-02 04:32:26 -070022public interface Port extends Annotated {
tomb36046e2014-08-27 00:22:24 -070023
tomca20e0c2014-09-03 23:22:24 -070024 /**
tomb36046e2014-08-27 00:22:24 -070025 * Returns the port number.
26 *
27 * @return port number
28 */
29 PortNumber number();
30
31 /**
tomca20e0c2014-09-03 23:22:24 -070032 * Indicates whether or not the port is currently up and active.
33 *
34 * @return true if the port is operational
35 */
36 boolean isEnabled();
37
38 /**
tom29df6f42014-09-05 08:14:14 -070039 * Returns the parent network element to which this port belongs.
tomb36046e2014-08-27 00:22:24 -070040 *
41 * @return parent network element
42 */
tom29df6f42014-09-05 08:14:14 -070043 Element element();
tomb36046e2014-08-27 00:22:24 -070044
45 // set of port attributes
46
tomb36046e2014-08-27 00:22:24 -070047}