+ @ApiOperation(value = "Keep the poilicies alive for a service")
+ @ApiResponses(
+ value = {@ApiResponse(code = 200, message = "Policies timeout supervision refreshed"),
+ @ApiResponse(code = 404, message = "The service is not found, needs re-registration")})
+ @PostMapping("/services/keepalive")
+ public ResponseEntity<String> keepAliveService( //
+ @RequestParam(name = "name", required = true) String name) {
+ try {
+ services.getService(name).ping();
+ return new ResponseEntity<String>("OK", HttpStatus.OK);
+ } catch (Exception e) {
+ return new ResponseEntity<String>(e.getMessage(), HttpStatus.NOT_FOUND);
+ }
+ }
+