aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/java/org/onap/vid/controller/HealthStatus.java
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2019-01-10 12:42:59 +0000
committerGerrit Code Review <gerrit@onap.org>2019-01-10 12:42:59 +0000
commit659874df80409170e57b6dd6197eb3a81eb3468e (patch)
tree08e79fd57aa0ed299586fd88f69f87a5a2f5ded1 /vid-app-common/src/main/java/org/onap/vid/controller/HealthStatus.java
parent143784a849ece4fc35cc290e33f829b72bf1fc79 (diff)
parent6ad41e3ccd398a2721f41ad61c80b7bb03f7d127 (diff)
Merge "Merge from ECOMP's repository"
Diffstat (limited to 'vid-app-common/src/main/java/org/onap/vid/controller/HealthStatus.java')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/controller/HealthStatus.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/HealthStatus.java b/vid-app-common/src/main/java/org/onap/vid/controller/HealthStatus.java
new file mode 100644
index 000000000..14372b5de
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/controller/HealthStatus.java
@@ -0,0 +1,31 @@
+package org.onap.vid.controller;
+
+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;
+ }
+}