pankaj

Create a component for metrics

......@@ -60,6 +60,10 @@
<artifactId>metrics-core</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.scr.annotations</artifactId>
</dependency>
</dependencies>
</project>
......
......@@ -7,6 +7,10 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.TimeUnit;
import org.apache.felix.scr.annotations.Activate;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Deactivate;
import com.codahale.metrics.Counter;
import com.codahale.metrics.CsvReporter;
import com.codahale.metrics.Gauge;
......@@ -49,6 +53,7 @@ import com.codahale.metrics.Timer;
* </code>
* </pre>
*/
@Component(immediate = true)
public final class MetricsManager implements MetricsService {
/**
......@@ -79,6 +84,14 @@ public final class MetricsManager implements MetricsService {
reporter.start(10, TimeUnit.SECONDS);
}
@Activate
public void activate() {
}
@Deactivate
public void deactivate() {
}
/**
* Registers a component.
*
......