Class ActiveResult

java.lang.Object
io.quarkus.arc.ActiveResult

public final class ActiveResult extends Object
Result of the "is active?" question asked against a synthetic bean. Can say whether the bean is active and if it is not, what is the reason. Optionally, a cause may be set too.
  • Method Details

    • active

      public static ActiveResult active()
      The synthetic bean in question is active.
      Returns:
      the active result
    • inactive

      public static ActiveResult inactive(String reason)
      The synthetic bean is question is inactive for given reason.
      Parameters:
      reason - the reason why the synthetic bean is inactive; must not be null
      Returns:
      the inactive result
    • inactive

      public static ActiveResult inactive(String reason, ActiveResult cause)
      The synthetic bean is question is inactive for given reason. The given cause is an ActiveResult for an underlying bean that is inactive and causes this bean to also become inactive.
      Parameters:
      reason - the reason why the synthetic bean is inactive; must not be null
      cause - the cause why the synthetic bean is inactive; may be null, but when it is not, it must be inactive as well
      Returns:
      the inactive result with a cause
    • value

      public boolean value()
      Returns whether the synthetic bean in question is active.
      Returns:
      whether the synthetic bean in question is active
    • inactiveReason

      public String inactiveReason()
      Returns the reason why the synthetic bean is not active. Returns null only if the synthetic bean is active.
      Returns:
      the reason why the synthetic bean is not active
    • inactiveCause

      public ActiveResult inactiveCause()
      Returns the cause of why the synthetic bean is not active.
      Returns:
      the cause of why the synthetic bean is not active; may be null