Drop "I" prefix from IAction, IMatch, IMatchActionService. (ONOS-1879)
Change-Id: I6b6e0cc98570d5b95a46a9f204cf330f4cf63273
diff --git a/src/main/java/net/onrc/onos/api/flowmanager/Flow.java b/src/main/java/net/onrc/onos/api/flowmanager/Flow.java
index bd1c619..50c9d16 100644
--- a/src/main/java/net/onrc/onos/api/flowmanager/Flow.java
+++ b/src/main/java/net/onrc/onos/api/flowmanager/Flow.java
@@ -2,7 +2,7 @@
import net.onrc.onos.api.batchoperation.BatchOperationTarget;
import net.onrc.onos.core.matchaction.MatchActionPlan;
-import net.onrc.onos.core.matchaction.match.IMatch;
+import net.onrc.onos.core.matchaction.match.Match;
/**
* An interface class to define flow object which is managed by
@@ -24,7 +24,7 @@
*
* @return a traffic filter for this flow object.
*/
- public IMatch getMatch();
+ public Match getMatch();
/**
* Compiles this object to MatchAction plan.
diff --git a/src/main/java/net/onrc/onos/api/flowmanager/OpticalPathFlow.java b/src/main/java/net/onrc/onos/api/flowmanager/OpticalPathFlow.java
index 00a4785..1b37d7f 100644
--- a/src/main/java/net/onrc/onos/api/flowmanager/OpticalPathFlow.java
+++ b/src/main/java/net/onrc/onos/api/flowmanager/OpticalPathFlow.java
@@ -3,7 +3,7 @@
import java.util.List;
import net.onrc.onos.core.matchaction.MatchActionPlan;
-import net.onrc.onos.core.matchaction.action.IAction;
+import net.onrc.onos.core.matchaction.action.Action;
import net.onrc.onos.core.util.PortNumber;
/**
@@ -21,11 +21,11 @@
* @param id ID for this new IFlow object.
* @param inPort Ingress port number at the ingress edge node.
* @param path Path between ingress and egress edge node.
- * @param actions The list of IAction objects at the egress edge node.
+ * @param actions The list of Action objects at the egress edge node.
* @param lambda The lambda to be used throughout the path.
*/
public OpticalPathFlow(String id,
- PortNumber inPort, Path path, List<IAction> actions, int lambda) {
+ PortNumber inPort, Path path, List<Action> actions, int lambda) {
super(id, null, inPort, path, actions);
this.lambda = lambda;
// TODO Auto-generated constructor stub
diff --git a/src/main/java/net/onrc/onos/api/flowmanager/PacketPathFlow.java b/src/main/java/net/onrc/onos/api/flowmanager/PacketPathFlow.java
index 087ef47..5f3aa31 100644
--- a/src/main/java/net/onrc/onos/api/flowmanager/PacketPathFlow.java
+++ b/src/main/java/net/onrc/onos/api/flowmanager/PacketPathFlow.java
@@ -3,7 +3,7 @@
import java.util.List;
import net.onrc.onos.core.matchaction.MatchActionPlan;
-import net.onrc.onos.core.matchaction.action.IAction;
+import net.onrc.onos.core.matchaction.action.Action;
import net.onrc.onos.core.matchaction.match.PacketMatch;
import net.onrc.onos.core.util.PortNumber;
@@ -23,12 +23,12 @@
* @param match Match object at the source node of the path.
* @param inPort Ingress port number at the ingress edge node.
* @param path Path between ingress and egress edge node.
- * @param edgeActions The list of IAction objects at the egress edge node.
+ * @param edgeActions The list of Action objects at the egress edge node.
* @param hardTimeout hard-timeout value.
* @param idleTimeout idle-timeout value.
*/
public PacketPathFlow(String id,
- PacketMatch match, PortNumber inPort, Path path, List<IAction> edgeActions,
+ PacketMatch match, PortNumber inPort, Path path, List<Action> edgeActions,
int hardTimeout, int idleTimeout) {
super(id, match, inPort, path, edgeActions);
this.hardTimeout = hardTimeout;
diff --git a/src/main/java/net/onrc/onos/api/flowmanager/PathFlow.java b/src/main/java/net/onrc/onos/api/flowmanager/PathFlow.java
index 787a11f..b09d8bf 100644
--- a/src/main/java/net/onrc/onos/api/flowmanager/PathFlow.java
+++ b/src/main/java/net/onrc/onos/api/flowmanager/PathFlow.java
@@ -3,8 +3,8 @@
import java.util.List;
import net.onrc.onos.core.matchaction.MatchActionPlan;
-import net.onrc.onos.core.matchaction.action.IAction;
-import net.onrc.onos.core.matchaction.match.IMatch;
+import net.onrc.onos.core.matchaction.action.Action;
+import net.onrc.onos.core.matchaction.match.Match;
import net.onrc.onos.core.util.PortNumber;
/**
@@ -15,10 +15,10 @@
*/
public class PathFlow implements Flow {
protected final FlowId id;
- protected IMatch match;
+ protected Match match;
protected PortNumber ingressPort;
protected Path path;
- protected List<IAction> egressActions;
+ protected List<Action> egressActions;
/**
* Constructor.
@@ -28,10 +28,10 @@
* @param ingressPort The ingress port number at the ingress node of the
* path.
* @param path Path between ingress and egress edge node.
- * @param egressActions The list of IAction objects at the egress edge node.
+ * @param egressActions The list of Action objects at the egress edge node.
*/
public PathFlow(String id,
- IMatch match, PortNumber ingressPort, Path path, List<IAction> egressActions) {
+ Match match, PortNumber ingressPort, Path path, List<Action> egressActions) {
this.id = new FlowId(id);
this.match = match;
this.ingressPort = ingressPort;
@@ -45,7 +45,7 @@
}
@Override
- public IMatch getMatch() {
+ public Match getMatch() {
return match;
}
@@ -74,11 +74,11 @@
}
/**
- * Gets the list of IAction objects at the egress edge node.
+ * Gets the list of Action objects at the egress edge node.
*
- * @return The list of IAction objects at the egress edge node.
+ * @return The list of Action objects at the egress edge node.
*/
- public List<IAction> getEgressActions() {
+ public List<Action> getEgressActions() {
return egressActions;
}
}
diff --git a/src/main/java/net/onrc/onos/core/matchaction/MatchAction.java b/src/main/java/net/onrc/onos/core/matchaction/MatchAction.java
index d31ced8..2ff3299 100644
--- a/src/main/java/net/onrc/onos/core/matchaction/MatchAction.java
+++ b/src/main/java/net/onrc/onos/core/matchaction/MatchAction.java
@@ -5,9 +5,9 @@
import net.floodlightcontroller.util.MACAddress;
import net.onrc.onos.api.batchoperation.BatchOperationTarget;
-import net.onrc.onos.core.matchaction.action.IAction;
+import net.onrc.onos.core.matchaction.action.Action;
import net.onrc.onos.core.matchaction.action.OutputAction;
-import net.onrc.onos.core.matchaction.match.IMatch;
+import net.onrc.onos.core.matchaction.match.Match;
import net.onrc.onos.core.matchaction.match.PacketMatch;
import net.onrc.onos.core.util.Dpid;
import net.onrc.onos.core.util.IPv4;
@@ -20,19 +20,19 @@
public class MatchAction implements BatchOperationTarget {
protected final MatchActionId id;
protected SwitchPort port;
- protected List<IMatch> matches;
- protected List<IAction> actions;
+ protected List<Match> matches;
+ protected List<Action> actions;
/**
* Constructor.
*
* @param id ID for this MatchAction object.
* @param port Switch DPID
- * @param matches The list of IMatch objects as match condition on the port.
- * @param actions The list of IAction objects as actions on the switch.
+ * @param matches The list of Match objects as match condition on the port.
+ * @param actions The list of Action objects as actions on the switch.
*/
- public MatchAction(String id, SwitchPort port, List<IMatch> matches,
- List<IAction> actions) {
+ public MatchAction(String id, SwitchPort port, List<Match> matches,
+ List<Action> actions) {
this.id = new MatchActionId(id);
this.port = port;
this.matches = matches;
@@ -59,8 +59,8 @@
IPv4 srcIp, IPv4 dstIp, PortNumber dstPort) {
// CHECKSTYLE:ON
this(id, new SwitchPort(dpid, srcPort),
- Arrays.asList((IMatch) new PacketMatch(srcMac, dstMac, srcIp, dstIp)),
- Arrays.asList((IAction) new OutputAction(dstPort)));
+ Arrays.asList((Match) new PacketMatch(srcMac, dstMac, srcIp, dstIp)),
+ Arrays.asList((Action) new OutputAction(dstPort)));
}
public MatchActionId getId() {
@@ -81,7 +81,7 @@
*
* @return The traffic filter.
*/
- public List<IMatch> getMatches() {
+ public List<Match> getMatches() {
return matches;
}
@@ -90,7 +90,7 @@
*
* @return The list of actions.
*/
- public List<IAction> getActions() {
+ public List<Action> getActions() {
return actions;
}
}
diff --git a/src/main/java/net/onrc/onos/core/matchaction/MatchActionModule.java b/src/main/java/net/onrc/onos/core/matchaction/MatchActionModule.java
index cae8df2..2630879 100644
--- a/src/main/java/net/onrc/onos/core/matchaction/MatchActionModule.java
+++ b/src/main/java/net/onrc/onos/core/matchaction/MatchActionModule.java
@@ -10,7 +10,7 @@
* <p>
* TODO: Make all methods thread-safe
*/
-public class MatchActionModule implements IMatchActionService {
+public class MatchActionModule implements MatchActionService {
@Override
public boolean addMatchAction(MatchAction matchAction) {
diff --git a/src/main/java/net/onrc/onos/core/matchaction/IMatchActionService.java b/src/main/java/net/onrc/onos/core/matchaction/MatchActionService.java
similarity index 97%
rename from src/main/java/net/onrc/onos/core/matchaction/IMatchActionService.java
rename to src/main/java/net/onrc/onos/core/matchaction/MatchActionService.java
index 1ff8e28..02a7ef3 100644
--- a/src/main/java/net/onrc/onos/core/matchaction/IMatchActionService.java
+++ b/src/main/java/net/onrc/onos/core/matchaction/MatchActionService.java
@@ -8,7 +8,7 @@
/**
* An interface for the match-action service.
*/
-public interface IMatchActionService {
+public interface MatchActionService {
/**
* Adds a new match-action entry.
*
diff --git a/src/main/java/net/onrc/onos/core/matchaction/action/IAction.java b/src/main/java/net/onrc/onos/core/matchaction/action/Action.java
similarity index 77%
rename from src/main/java/net/onrc/onos/core/matchaction/action/IAction.java
rename to src/main/java/net/onrc/onos/core/matchaction/action/Action.java
index b381f85..373e4c8 100644
--- a/src/main/java/net/onrc/onos/core/matchaction/action/IAction.java
+++ b/src/main/java/net/onrc/onos/core/matchaction/action/Action.java
@@ -3,6 +3,6 @@
/**
* An interface of action objects.
*/
-public interface IAction {
+public interface Action {
}
diff --git a/src/main/java/net/onrc/onos/core/matchaction/action/ModifyLambdaAction.java b/src/main/java/net/onrc/onos/core/matchaction/action/ModifyLambdaAction.java
index 5399de3..ab62f5f 100644
--- a/src/main/java/net/onrc/onos/core/matchaction/action/ModifyLambdaAction.java
+++ b/src/main/java/net/onrc/onos/core/matchaction/action/ModifyLambdaAction.java
@@ -6,7 +6,7 @@
* This class does not have a switch ID. The switch ID is handled by
* MatchAction, IFlow or Intent class.
*/
-public class ModifyLambdaAction implements IAction {
+public class ModifyLambdaAction implements Action {
protected int lambda;
/**
diff --git a/src/main/java/net/onrc/onos/core/matchaction/action/OutputAction.java b/src/main/java/net/onrc/onos/core/matchaction/action/OutputAction.java
index f570ea8..6c2e782 100644
--- a/src/main/java/net/onrc/onos/core/matchaction/action/OutputAction.java
+++ b/src/main/java/net/onrc/onos/core/matchaction/action/OutputAction.java
@@ -8,7 +8,7 @@
* This class does not have a switch ID. The switch ID is handled by
* MatchAction, IFlow or Intent class.
*/
-public class OutputAction implements IAction {
+public class OutputAction implements Action {
protected PortNumber portNumber;
/**
diff --git a/src/main/java/net/onrc/onos/core/matchaction/match/IMatch.java b/src/main/java/net/onrc/onos/core/matchaction/match/Match.java
similarity index 78%
rename from src/main/java/net/onrc/onos/core/matchaction/match/IMatch.java
rename to src/main/java/net/onrc/onos/core/matchaction/match/Match.java
index 904e337..6a3dabe 100644
--- a/src/main/java/net/onrc/onos/core/matchaction/match/IMatch.java
+++ b/src/main/java/net/onrc/onos/core/matchaction/match/Match.java
@@ -3,6 +3,6 @@
/**
* An interface for match objects.
*/
-public interface IMatch {
+public interface Match {
}
diff --git a/src/main/java/net/onrc/onos/core/matchaction/match/OpticalMatch.java b/src/main/java/net/onrc/onos/core/matchaction/match/OpticalMatch.java
index 00bae0e..afd9de0 100644
--- a/src/main/java/net/onrc/onos/core/matchaction/match/OpticalMatch.java
+++ b/src/main/java/net/onrc/onos/core/matchaction/match/OpticalMatch.java
@@ -6,7 +6,7 @@
* This class does not have a switch ID and a port number. They are handled by
* MatchAction, IFlow or Intent class.
*/
-public class OpticalMatch implements IMatch {
+public class OpticalMatch implements Match {
// Match fields
protected Integer srcLambda;
diff --git a/src/main/java/net/onrc/onos/core/matchaction/match/PacketMatch.java b/src/main/java/net/onrc/onos/core/matchaction/match/PacketMatch.java
index 3584038..39d3c09 100644
--- a/src/main/java/net/onrc/onos/core/matchaction/match/PacketMatch.java
+++ b/src/main/java/net/onrc/onos/core/matchaction/match/PacketMatch.java
@@ -10,7 +10,7 @@
* This class does not have a switch ID and a port number. They are handled by
* MatchAction, IFlow or Intent class.
*/
-public class PacketMatch implements IMatch {
+public class PacketMatch implements Match {
// Match fields
protected MACAddress srcMacAddress;
diff --git a/src/main/java/net/onrc/onos/core/newintent/MultiPointToSinglePointIntent.java b/src/main/java/net/onrc/onos/core/newintent/MultiPointToSinglePointIntent.java
index 51ce25e..e411dd9 100644
--- a/src/main/java/net/onrc/onos/core/newintent/MultiPointToSinglePointIntent.java
+++ b/src/main/java/net/onrc/onos/core/newintent/MultiPointToSinglePointIntent.java
@@ -4,8 +4,8 @@
import com.google.common.collect.ImmutableList;
import net.onrc.onos.api.intent.Intent;
import net.onrc.onos.api.intent.IntentId;
-import net.onrc.onos.core.matchaction.action.IAction;
-import net.onrc.onos.core.matchaction.match.IMatch;
+import net.onrc.onos.core.matchaction.action.Action;
+import net.onrc.onos.core.matchaction.match.Match;
import net.onrc.onos.core.util.SwitchPort;
import java.util.List;
@@ -22,8 +22,8 @@
public class MultiPointToSinglePointIntent extends Intent {
private final ImmutableList<SwitchPort> ingressPorts;
private final SwitchPort egressPort;
- private final IMatch match;
- private final ImmutableList<IAction> modifications;
+ private final Match match;
+ private final ImmutableList<Action> modifications;
/**
* Constructs an intent representing multiple sources, single destination
@@ -38,8 +38,8 @@
public MultiPointToSinglePointIntent(IntentId id,
List<SwitchPort> ingressPorts,
SwitchPort egressPort,
- IMatch match,
- List<IAction> modifications) {
+ Match match,
+ List<Action> modifications) {
super(id);
this.ingressPorts = ImmutableList.copyOf(checkNotNull(ingressPorts));
@@ -71,7 +71,7 @@
*
* @return the filter condition of the incoming traffic which can go through.
*/
- public IMatch getMatch() {
+ public Match getMatch() {
return match;
}
@@ -80,7 +80,7 @@
*
* @return the modification actions to the outgoing traffic.
*/
- public ImmutableList<IAction> getModifications() {
+ public ImmutableList<Action> getModifications() {
return modifications;
}
diff --git a/src/main/java/net/onrc/onos/core/newintent/PointToPointIntent.java b/src/main/java/net/onrc/onos/core/newintent/PointToPointIntent.java
index 032f931..95e6be8 100644
--- a/src/main/java/net/onrc/onos/core/newintent/PointToPointIntent.java
+++ b/src/main/java/net/onrc/onos/core/newintent/PointToPointIntent.java
@@ -3,7 +3,7 @@
import com.google.common.base.Objects;
import net.onrc.onos.api.intent.Intent;
import net.onrc.onos.api.intent.IntentId;
-import net.onrc.onos.core.matchaction.match.IMatch;
+import net.onrc.onos.core.matchaction.match.Match;
import net.onrc.onos.core.util.Pair;
import net.onrc.onos.core.util.SwitchPort;
@@ -18,7 +18,7 @@
public class PointToPointIntent extends Intent {
private final SwitchPort ingressPort;
private final SwitchPort egressPort;
- private final IMatch match;
+ private final Match match;
private final long idleTimeout;
private final TimeUnit unit;
@@ -33,7 +33,7 @@
*/
public PointToPointIntent(IntentId id,
SwitchPort ingressPort, SwitchPort egressPort,
- IMatch match) {
+ Match match) {
this(id, ingressPort, egressPort, match, 0, TimeUnit.SECONDS);
}
@@ -51,7 +51,7 @@
*/
public PointToPointIntent(IntentId id,
SwitchPort ingressPort, SwitchPort egressPort,
- IMatch match, long idleTimeout, TimeUnit unit) {
+ Match match, long idleTimeout, TimeUnit unit) {
super(id);
checkArgument(idleTimeout >= 0, "idleTimeout should not be negative");
@@ -86,7 +86,7 @@
*
* @return the match condition.
*/
- public IMatch getMatch() {
+ public Match getMatch() {
return match;
}