diff options
Diffstat (limited to 'feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/RestHealthCheck.java')
-rw-r--r-- | feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/RestHealthCheck.java | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/RestHealthCheck.java b/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/RestHealthCheck.java index 3f51ba46..734a75e0 100644 --- a/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/RestHealthCheck.java +++ b/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/RestHealthCheck.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * feature-healthcheck * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,8 +17,15 @@ * limitations under the License. * ============LICENSE_END========================================================= */ + package org.onap.policy.drools.healthcheck; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.Info; +import io.swagger.annotations.SwaggerDefinition; +import io.swagger.annotations.Tag; + import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; @@ -27,12 +34,6 @@ import javax.ws.rs.core.Response; import org.onap.policy.drools.healthcheck.HealthCheck.Reports; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.Info; -import io.swagger.annotations.SwaggerDefinition; -import io.swagger.annotations.Tag; - @Path("/") @Api @Produces(MediaType.APPLICATION_JSON) @@ -50,28 +51,29 @@ import io.swagger.annotations.Tag; } ) public class RestHealthCheck { - + @GET @Path("healthcheck") @Produces(MediaType.APPLICATION_JSON) @ApiOperation( - value="Perform a system healthcheck", - notes="Provides healthy status of the PDP-D plus the components defined in its configuration by using a REST interface", - response=Reports.class - ) + value = "Perform a system healthcheck", + notes = "Provides healthy status of the PDP-D plus the components defined in its " + + "configuration by using a REST interface", + response = Reports.class + ) public Response healthcheck() { - return Response.status(Response.Status.OK).entity(HealthCheck.monitor.healthCheck()).build(); + return Response.status(Response.Status.OK).entity(HealthCheck.monitor.healthCheck()).build(); } - + @GET @Path("healthcheck/configuration") @Produces(MediaType.APPLICATION_JSON) @ApiOperation( - value="Configuration", - notes="Provides the Healthcheck server configuration and monitored REST clients", - response=HealthCheck.class - ) + value = "Configuration", + notes = "Provides the Healthcheck server configuration and monitored REST clients", + response = HealthCheck.class + ) public HealthCheck configuration() { - return HealthCheck.monitor; + return HealthCheck.monitor; } } |