aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/onos/openflow/api/src/main/java/org/onosproject/openflow/controller/WithTypedPorts.java
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/onos/openflow/api/src/main/java/org/onosproject/openflow/controller/WithTypedPorts.java')
-rw-r--r--framework/src/onos/openflow/api/src/main/java/org/onosproject/openflow/controller/WithTypedPorts.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/framework/src/onos/openflow/api/src/main/java/org/onosproject/openflow/controller/WithTypedPorts.java b/framework/src/onos/openflow/api/src/main/java/org/onosproject/openflow/controller/WithTypedPorts.java
new file mode 100644
index 00000000..b78124b8
--- /dev/null
+++ b/framework/src/onos/openflow/api/src/main/java/org/onosproject/openflow/controller/WithTypedPorts.java
@@ -0,0 +1,30 @@
+package org.onosproject.openflow.controller;
+
+import java.util.List;
+import java.util.Set;
+
+import org.projectfloodlight.openflow.protocol.OFObject;
+
+/**
+ * An interface implemented by OpenFlow devices that enables providers to
+ * retrieve ports based on port property.
+ */
+public interface WithTypedPorts {
+
+ /**
+ * Return a list of interfaces (ports) of the type associated with this
+ * OpenFlow switch.
+ *
+ * @param type The port description property type of requested ports
+ * @return A potentially empty list of ports.
+ */
+ List<? extends OFObject> getPortsOf(PortDescPropertyType type);
+
+ /**
+ * Returns the port property types supported by the driver implementing this
+ * interface.
+ *
+ * @return A set of port property types
+ */
+ Set<PortDescPropertyType> getPortTypes();
+}