org.springframework.boot.availability

Interface ApplicationAvailability

    • Method Detail

      • getLivenessState

        default LivenessState getLivenessState()
        Return the LivenessState of the application.
        Returns:
        the liveness state
      • getState

        <S extends AvailabilityState> S getState(java.lang.Class<S> stateType,
                                                 S defaultState)
        Return AvailabilityState information for the application.
        Type Parameters:
        S - the state type
        Parameters:
        stateType - the state type
        defaultState - the default state to return if no event of the given type has been published yet (must not be null).
        Returns:
        the readiness state
        See Also:
        getState(Class)
      • getState

        <S extends AvailabilityState> S getState(java.lang.Class<S> stateType)
        Return AvailabilityState information for the application.
        Type Parameters:
        S - the state type
        Parameters:
        stateType - the state type
        Returns:
        the readiness state or null if no event of the given type has been published yet
        See Also:
        getState(Class, AvailabilityState)
      • getLastChangeEvent

        <S extends AvailabilityStateAvailabilityChangeEvent<S> getLastChangeEvent(java.lang.Class<S> stateType)
        Return the last AvailabilityChangeEvent received for a given state type.
        Type Parameters:
        S - the state type
        Parameters:
        stateType - the state type
        Returns:
        the readiness state or null if no event of the given type has been published yet