All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.otto.edison.status.indicator.StatusDetailIndicator Maven / Gradle / Ivy

There is a newer version: 0.82.2
Show newest version
package de.otto.edison.status.indicator;

import de.otto.edison.status.domain.StatusDetail;

import java.util.List;

import static java.util.Arrays.asList;

/**
 * Indicates status information about a single part of the application.
 *
 * The status of the application is calculated using one or more StatusDetails. StatusDetailIndicators
 * are used to calculate and offer StatusDetails.
 *
 * @author Guido Steinacker
 * @since 13.02.15
 */
public interface StatusDetailIndicator {

    /**
     * Return the current StatusDetail state.
     * @return StatusDetail
     */
    StatusDetail statusDetail();

    /**
     * Return multiple StatusDetails about different parts of the application.
     *
     * By default, this method returns a list containing only one StatusDetail, the one returned by
     * {@link #statusDetail()}
     *
     * @return list of StatusDetails
     */
    default List statusDetails() {
        return asList(statusDetail());
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy