All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.zhengframework.rest.metrics.MeterInterceptor Maven / Gradle / Ivy

package com.github.zhengframework.rest.metrics;

import com.codahale.metrics.Meter;
import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.container.ContainerRequestFilter;

public class MeterInterceptor implements ContainerRequestFilter {

  private final Meter meter;

  public MeterInterceptor(Meter meter) {
    this.meter = meter;
  }

  @Override
  public void filter(ContainerRequestContext requestContext) {
    meter.mark();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy