Open Kilda Java Documentation
FlowState.java
Go to the documentation of this file.
1
/* Copyright 2017 Telstra Open Source
2
*
3
* Licensed under the Apache License, Version 2.0 (the "License");
4
* you may not use this file except in compliance with the License.
5
* You may obtain a copy of the License at
6
*
7
* http://www.apache.org/licenses/LICENSE-2.0
8
*
9
* Unless required by applicable law or agreed to in writing, software
10
* distributed under the License is distributed on an "AS IS" BASIS,
11
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
* See the License for the specific language governing permissions and
13
* limitations under the License.
14
*/
15
16
package
org.openkilda.messaging.payload.flow;
17
18
import
com.fasterxml.jackson.annotation.JsonCreator;
19
import
com.fasterxml.jackson.annotation.JsonProperty;
20
24
public
enum
FlowState
{
28
ALLOCATED
(
"Allocated"
),
29
33
IN_PROGRESS
(
"In progress"
),
34
38
UP
(
"Up"
),
39
43
DOWN
(
"Down"
),
44
48
CACHED
(
"Cached"
);
49
53
@JsonProperty(
"state"
)
54
private final String state;
55
61
@JsonCreator
62
FlowState
(@JsonProperty("state") final String state) {
63
this.state = state;
64
}
65
71
public
String
getState
() {
72
return
this.state;
73
}
74
78
@Override
79
public
String
toString
() {
80
return
state;
81
}
82
83
public
boolean
isActive
() {
84
return
this
== UP;
85
}
86
87
public
boolean
isActiveOrCached
() {
88
return
this
== UP ||
this
== CACHED;
89
}
90
}
91
org.openkilda.messaging.payload.flow.FlowState.isActive
boolean isActive()
Definition:
FlowState.java:83
org.openkilda.messaging.payload.flow.FlowState.CACHED
CACHED
Definition:
FlowState.java:48
org.openkilda.messaging.payload.flow.FlowState.UP
UP
Definition:
FlowState.java:38
org.openkilda.messaging.payload.flow.FlowState.IN_PROGRESS
IN_PROGRESS
Definition:
FlowState.java:33
org.openkilda.messaging.payload.flow.FlowState
Definition:
FlowState.java:24
org.openkilda.messaging.payload.flow.FlowState.ALLOCATED
ALLOCATED
Definition:
FlowState.java:28
org.openkilda.messaging.payload.flow.FlowState.toString
String toString()
Definition:
FlowState.java:79
org.openkilda.messaging.payload.flow.FlowState.DOWN
DOWN
Definition:
FlowState.java:43
org.openkilda.messaging.payload.flow.FlowState.isActiveOrCached
boolean isActiveOrCached()
Definition:
FlowState.java:87
org.openkilda.messaging.payload.flow.FlowState.getState
String getState()
Definition:
FlowState.java:71
open-kilda-develop
services
src
messaging
src
main
java
org
openkilda
messaging
payload
flow
FlowState.java
Generated by
1.8.14