Skip to content

Commit

Permalink
[HWKMETRICS-185] Add back the injection annotation for Metrics Service.
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Negrea committed Aug 13, 2015
1 parent ff2084d commit 2c343f8
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 4 deletions.
10 changes: 8 additions & 2 deletions api/metrics-api-jaxrs-1.1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>

<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
Expand All @@ -79,6 +79,12 @@
<version>1.0.2.Final</version>
</dependency>

<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>

<dependency>
<groupId>io.reactivex</groupId>
<artifactId>rxjava</artifactId>
Expand All @@ -88,7 +94,7 @@
<groupId>io.reactivex</groupId>
<artifactId>rxjava-math</artifactId>
</dependency>

<!-- documentation -->
<dependency>
<groupId>com.wordnik</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import java.util.Map;
import java.util.Optional;

import javax.inject.Inject;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.DefaultValue;
Expand Down Expand Up @@ -88,6 +89,7 @@ public class AvailabilityHandler {

private static final Logger logger = LoggerFactory.getLogger(AvailabilityHandler.class);

@Inject
private MetricsService metricsService;

@HeaderParam(TenantFilter.TENANT_HEADER_NAME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.net.URI;
import java.util.List;

import javax.inject.Inject;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.HeaderParam;
Expand Down Expand Up @@ -76,6 +77,7 @@ public class CounterHandler {

private static final long EIGHT_HOURS = MILLISECONDS.convert(8, HOURS);

@Inject
private MetricsService metricsService;

@HeaderParam(TENANT_HEADER_NAME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import java.util.Map;
import java.util.function.Predicate;

import javax.inject.Inject;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
Expand Down Expand Up @@ -79,6 +80,7 @@
public class GaugeHandler {
private static final long EIGHT_HOURS = MILLISECONDS.convert(8, HOURS);

@Inject
private MetricsService metricsService;

@HeaderParam(TENANT_HEADER_NAME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.util.Collection;
import java.util.List;

import javax.inject.Inject;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.HeaderParam;
Expand Down Expand Up @@ -69,6 +70,7 @@
@Api(value = "", description = "Metrics related REST interface")
public class MetricHandler {

@Inject
private MetricsService metricsService;

@HeaderParam(TENANT_HEADER_NAME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import java.net.URI;

import javax.inject.Inject;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
Expand Down Expand Up @@ -54,8 +55,7 @@
@Api(value = "/tenants", description = "Tenants related REST interface")
public class TenantsHandler {

// TODO: add back retention settings

@Inject
private MetricsService metricsService;

@POST
Expand Down

0 comments on commit 2c343f8

Please sign in to comment.