diff options
author | Ofir Sonsino <ofir.sonsino@intl.att.com> | 2018-11-06 09:33:48 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-11-06 09:33:48 +0000 |
commit | 9daaecd1a2450fe2bae247ae320b4e7c6d7ceee5 (patch) | |
tree | 71f9de5d0d6240c0beb1f769671e30adf26f15f6 /vid-app-common/src/main/java/org/onap/vid/controllers/HealthStatus.java | |
parent | 5a7cdb624c0abe6f2b7e80bcbbaa740c4ee35e39 (diff) | |
parent | 56f2ad282e7a8d316b92878ae151767fea847265 (diff) |
Merge "HealthCheckController/test refactor"
Diffstat (limited to 'vid-app-common/src/main/java/org/onap/vid/controllers/HealthStatus.java')
-rw-r--r-- | vid-app-common/src/main/java/org/onap/vid/controllers/HealthStatus.java | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/controllers/HealthStatus.java b/vid-app-common/src/main/java/org/onap/vid/controllers/HealthStatus.java new file mode 100644 index 000000000..6056c2898 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/controllers/HealthStatus.java @@ -0,0 +1,31 @@ +package org.onap.vid.controllers; + +import org.springframework.http.HttpStatus; + +/** + * Model for JSON response with health-check results. + */ +public final class HealthStatus { + + private final int statusCode; + private final String detailedMsg; + private final String date; + + public HealthStatus(HttpStatus code, String date, String detailedMsg) { + this.statusCode = code.value(); + this.detailedMsg = detailedMsg; + this.date = date; + } + + public int getStatusCode() { + return statusCode; + } + + public String getDetailedMsg() { + return detailedMsg; + } + + public String getDate() { + return date; + } +} |