Toshio Koide | b8cea26 | 2014-08-12 18:45:46 -0700 | [diff] [blame] | 1 | package net.onrc.onos.api.flowmanager; |
| 2 | |
| 3 | /** |
| 4 | * The class which expresses the state changes of Flow object. |
| 5 | */ |
| 6 | public class FlowStateChange { |
| 7 | private final FlowId flowId; |
| 8 | private final FlowState current; |
| 9 | private final FlowState previous; |
| 10 | |
| 11 | /** |
| 12 | * Creates {@link FlowStateChange} instance. |
| 13 | * |
| 14 | * @param flowId the ID of the target flow |
| 15 | * @param current the current state of the flow |
| 16 | * @param previous the previous state of the flow |
| 17 | */ |
Toshio Koide | d6dbb95 | 2014-08-22 14:29:04 -0700 | [diff] [blame] | 18 | public FlowStateChange(FlowId flowId, FlowState current, FlowState previous) { |
Toshio Koide | b8cea26 | 2014-08-12 18:45:46 -0700 | [diff] [blame] | 19 | this.flowId = flowId; |
| 20 | this.current = current; |
| 21 | this.previous = previous; |
| 22 | } |
| 23 | |
| 24 | /** |
| 25 | * Gets the ID of the flow. |
| 26 | * |
| 27 | * @return the flow ID |
| 28 | */ |
| 29 | public FlowId getFlowId() { |
| 30 | return flowId; |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * Gets the current state of the flow. |
| 35 | * |
| 36 | * @return the current state of the flow |
| 37 | */ |
| 38 | public FlowState getCurrentState() { |
| 39 | return current; |
| 40 | } |
| 41 | |
| 42 | /** |
| 43 | * Gets the previous state of the flow. |
| 44 | * |
| 45 | * @return the previous state of the flow |
| 46 | */ |
| 47 | public FlowState getPreviousState() { |
| 48 | return previous; |
| 49 | } |
| 50 | } |