Class BasicFlagState

java.lang.Object
co.featbit.commons.model.BasicFlagState
Direct Known Subclasses:
AllFlagStates, FlagState

public abstract class BasicFlagState extends Object
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 Details

    • success

      protected final boolean success
    • message

      protected final String message
  • Constructor Details

    • BasicFlagState

      public BasicFlagState(boolean success, String message)
  • Method Details

    • isSuccess

      public boolean isSuccess()
      if the last evaluation is successful
      Returns:
      true if the evaluation is successful
    • getMessage

      public String getMessage()
      return the message of flag state
      Returns:
      OK if the last evaluation is successful, otherwise return the reason
    • jsonfy

      public String jsonfy()
      object converted to json string
      Returns:
      a json string