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

com.rbmhtechnology.vind.api.result.StatusResult Maven / Gradle / Ivy

There is a newer version: 3.2.0
Show newest version
package com.rbmhtechnology.vind.api.result;

import java.util.HashMap;
import java.util.Map;

public class StatusResult {

    public enum Status {
        DOWN, UP
    }

    private Status status;

    private HashMap details;

    private StatusResult(Status status) {
        this.status = status;
        this.details = new HashMap<>();
    }

    public static StatusResult up() {
        return new StatusResult(Status.UP);
    }

    public static StatusResult down() {
        return new StatusResult(Status.DOWN);
    }

    public Status getStatus() {
        return status;
    }

    public StatusResult setDetail(String name, Object value) {
        details.put(name, value);
        return this;
    }

    public Map getDetails() {
        return details;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy