Search in sources :

Example 1 with DefaultResourceConfig

use of com.sun.jersey.api.core.DefaultResourceConfig in project metrics by dropwizard.

the class SingletonMetricsJerseyTest method configure.

@Override
protected AppDescriptor configure() {
    this.registry = new MetricRegistry();
    final DefaultResourceConfig config = new DefaultResourceConfig();
    config.getSingletons().add(new InstrumentedResourceMethodDispatchAdapter(registry));
    config.getClasses().add(InstrumentedResource.class);
    return new LowLevelAppDescriptor.Builder(config).build();
}
Also used : DefaultResourceConfig(com.sun.jersey.api.core.DefaultResourceConfig) MetricRegistry(com.codahale.metrics.MetricRegistry) LowLevelAppDescriptor(com.sun.jersey.test.framework.LowLevelAppDescriptor)

Aggregations

MetricRegistry (com.codahale.metrics.MetricRegistry)1 DefaultResourceConfig (com.sun.jersey.api.core.DefaultResourceConfig)1 LowLevelAppDescriptor (com.sun.jersey.test.framework.LowLevelAppDescriptor)1