Skip to content

Commit

Permalink
[HWKMETRICS-185] Re-enable the status handler for the metrics service.
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Negrea committed Aug 13, 2015
1 parent 1f54e23 commit 07322df
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
import javax.ws.rs.Produces;
import javax.ws.rs.core.Response;

import org.hawkular.metrics.api.jaxrs.MetricsServiceLifecycle;
import org.hawkular.metrics.api.jaxrs.MetricsServiceLifecycle.State;

import com.wordnik.swagger.annotations.ApiOperation;

/**
Expand All @@ -37,18 +40,17 @@ public class StatusHandler {

public static final String PATH = "/status";

// private MetricsServiceLifecycle metricsServiceLifecycle;

// private static final String METRICSSERVICE_NAME = "MetricsService";
private MetricsServiceLifecycle metricsServiceLifecycle;
private static final String METRICSSERVICE_NAME = "MetricsService";

@GET
@ApiOperation(value = "Returns the current status for various components.",
response = String.class, responseContainer = "Map")
public Response status() {
Map<String, Object> status = new HashMap<>();

// State metricState = metricsServiceLifecycle.getState();
// status.put(METRICSSERVICE_NAME, metricState.toString());
State metricState = metricsServiceLifecycle.getState();
status.put(METRICSSERVICE_NAME, metricState.toString());

return Response.ok(status).build();
}
Expand Down

0 comments on commit 07322df

Please sign in to comment.