Class AppInfoController
java.lang.Object
cf.maybelambda.httpvalidator.springboot.controller.AppInfoController
Controller for providing status and last run information of the application.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the information about the last run of the validation service.Retrieves the current status of the web application.
-
Field Details
-
START_TIME_KEY
- See Also:
-
TIME_ELAPSED_KEY
- See Also:
-
TASKS_TOTAL_KEY
- See Also:
-
TASKS_OK_KEY
- See Also:
-
TASKS_FAILED_KEY
- See Also:
-
TASKS_ERRORS_KEY
- See Also:
-
NO_LASTRUN_DATA_ERROR_MSG
- See Also:
-
STATUS_ENDPOINT
- See Also:
-
LAST_RUN_ENDPOINT
- See Also:
-
ERROR_VALUE
- See Also:
-
DATAFILE_STATUS_KEY
- See Also:
-
CONFIG_STATUS_KEY
- See Also:
-
-
Constructor Details
-
AppInfoController
public AppInfoController()
-
-
Method Details
-
informWebAppStatus
@GetMapping("/api/status") public org.springframework.http.ResponseEntity<Map<String,String>> informWebAppStatus()Retrieves the current status of the web application. Body: datafile and config status (i.e. parsable / valid) and app's start time.- Returns:
- ResponseEntity containing the status information.
-
informLastRunData
@GetMapping("/api/validator/lastrun") public org.springframework.http.ResponseEntity<Map<String,String>> informLastRunData()Retrieves the information about the last run of the validation service. If no last run data is available, it returns a SERVICE UNAVAILABLE status with an error message.- Returns:
- ResponseEntity containing the last run information or error message.
-