Ray Milkey | 18b44ac | 2014-08-22 08:29:47 -0700 | [diff] [blame] | 1 | package net.onrc.onos.core.matchaction; |
| 2 | |
| 3 | import net.onrc.onos.core.util.Dpid; |
| 4 | |
| 5 | public class SwitchResult { |
| 6 | private Dpid sw; |
| 7 | private Status status; |
| 8 | private MatchActionOperationsId matchSetId; |
| 9 | |
| 10 | protected enum Status { |
| 11 | 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 | |
| 22 | protected void setStatus(Status newStatus) { |
| 23 | this.status = newStatus; |
| 24 | } |
| 25 | |
| 26 | protected Status getStatus() { |
| 27 | return this.status; |
| 28 | } |
| 29 | |
| 30 | protected MatchActionOperationsId getMatchActionOperationsId() { |
| 31 | return this.matchSetId; |
| 32 | } |
| 33 | |
| 34 | protected Dpid getSwitch() { |
| 35 | return this.sw; |
| 36 | } |
| 37 | } |