blob: 5568ec193361b4d067323baa6209a685aedda96a [file] [log] [blame]
Toshio Koideb8cea262014-08-12 18:45:46 -07001package net.onrc.onos.api.flowmanager;
2
3/**
4 * The class which expresses the state changes of Flow object.
5 */
6public 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 Koided6dbb952014-08-22 14:29:04 -070018 public FlowStateChange(FlowId flowId, FlowState current, FlowState previous) {
Toshio Koideb8cea262014-08-12 18:45:46 -070019 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}