Package co.featbit.commons.model
Class BasicFlagState
java.lang.Object
co.featbit.commons.model.BasicFlagState
- Direct Known Subclasses:
AllFlagStates,FlagState
the abstract class of feature flag state, which contains 2 property:
success and message
this class and his subclasses are used to communicate between saas/server-side sdk and client side sdk
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionreturn the message of flag statebooleanif the last evaluation is successfuljsonfy()object converted to json string
-
Field Details
-
success
protected final boolean success -
message
-
-
Constructor Details
-
BasicFlagState
-
-
Method Details
-
isSuccess
public boolean isSuccess()if the last evaluation is successful- Returns:
- true if the evaluation is successful
-
getMessage
return the message of flag state- Returns:
- OK if the last evaluation is successful, otherwise return the reason
-
jsonfy
object converted to json string- Returns:
- a json string
-