blob: b5db2e8051d2caf5b52ba269861076e45648acbc [file] [log] [blame]
Ray Milkey18b44ac2014-08-22 08:29:47 -07001package net.onrc.onos.core.matchaction;
2
3import net.onrc.onos.core.util.Dpid;
4
5public class SwitchResult {
6 private Dpid sw;
7 private Status status;
8 private MatchActionOperationsId matchSetId;
9
Brian O'Connor0efc9062014-09-02 14:47:28 -070010 public enum Status {
Ray Milkey18b44ac2014-08-22 08:29:47 -070011 SUCCESS,
12 FAILURE,
13 UNKNOWN
14 }
15
16 protected SwitchResult(MatchActionOperationsId match, Dpid sw) {
17 this.sw = sw;
18 this.status = Status.UNKNOWN;
19 this.matchSetId = match;
20 }
21
Brian O'Connor0efc9062014-09-02 14:47:28 -070022 /**
23 * no-arg constructor for Kryo.
24 */
25 protected SwitchResult() {
26
27 }
28
Ray Milkey18b44ac2014-08-22 08:29:47 -070029 protected void setStatus(Status newStatus) {
30 this.status = newStatus;
31 }
32
33 protected Status getStatus() {
34 return this.status;
35 }
36
37 protected MatchActionOperationsId getMatchActionOperationsId() {
38 return this.matchSetId;
39 }
40
41 protected Dpid getSwitch() {
42 return this.sw;
43 }
44}