Added javadoc for all the helper classes in SDN-IP.
Also changed a couple of names to better reflect the usage or comply with
naming standards:
in IBgpRouteService.java: getBGPdRestIp -> getBgpdRestIp
in Prefix.java: MAX_BYTES -> ADDRESS_LENGTH
Change-Id: Id23b6bb077d79d671d21e2490ab410f322d7c166
diff --git a/src/main/java/net/onrc/onos/apps/bgproute/PushedFlowMod.java b/src/main/java/net/onrc/onos/apps/bgproute/PushedFlowMod.java
index eaee857..137c22f 100644
--- a/src/main/java/net/onrc/onos/apps/bgproute/PushedFlowMod.java
+++ b/src/main/java/net/onrc/onos/apps/bgproute/PushedFlowMod.java
@@ -2,16 +2,21 @@
import org.openflow.protocol.OFFlowMod;
+// TODO This functionality should be handled by ONOS's flow layer in future.
/**
- * Wraps up a DPID and a OFFlowMod so we know how to delete
- * the flow if we have to.
- * <p/>
- * TODO This functionality should be handled by ONOS's flow layer in future.
+ * Collects together the DPID and OFFlowMod of a pushed flow mod. This
+ * information is used if the flow mod has to be deleted in the future.
*/
public class PushedFlowMod {
private final long dpid;
private OFFlowMod flowMod;
+ /**
+ * Class constructor, taking a DPID and a flow mod.
+ *
+ * @param dpid the DPID of the switch the flow mod was pushed to
+ * @param flowMod the OFFlowMod that was pushed to the switch
+ */
public PushedFlowMod(long dpid, OFFlowMod flowMod) {
this.dpid = dpid;
try {
@@ -21,10 +26,20 @@
}
}
+ /**
+ * Gets the DPID of the switch the flow mod was pushed to.
+ *
+ * @return the DPID of the switch
+ */
public long getDpid() {
return dpid;
}
+ /**
+ * Gets the OFFlowMod that was pushed to the switch.
+ *
+ * @return the OFFlowMod object
+ */
public OFFlowMod getFlowMod() {
return flowMod;
}