Codota Logo
MetricsDispatchListener
Code IndexAdd Codota to your IDE (free)

How to use
MetricsDispatchListener
in
ro.pippo.metrics

Best Java code snippets using ro.pippo.metrics.MetricsDispatchListener (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: pippo-java/pippo

@Override
public void onPostDispatch(Request request, Response response) {
  updateStatusCodeMetrics(response);
  activeRequests.dec();
}
origin: pippo-java/pippo

MetricsDispatchListener metricsDispatchListener = new MetricsDispatchListener(metricRegistry);
application.getRoutePreDispatchListeners().add(metricsDispatchListener);
application.getRoutePostDispatchListeners().add(metricsDispatchListener);
origin: ro.pippo/pippo-metrics

MetricsDispatchListener metricsDispatchListener = new MetricsDispatchListener(metricRegistry);
application.getRoutePreDispatchListeners().add(metricsDispatchListener);
application.getRoutePostDispatchListeners().add(metricsDispatchListener);
origin: com.gitblit.fathom/fathom-rest

private void initializeApplication() {
  // hook-up the Metrics dispatch listener
  MetricsDispatchListener metricsDispatchListener = new MetricsDispatchListener(metricRegistry);
  application.getRoutePreDispatchListeners().add(metricsDispatchListener);
  application.getRoutePostDispatchListeners().add(metricsDispatchListener);
  // set the RedirectException handler
  application.getErrorHandler().setExceptionHandler(RedirectException.class, (exception, ctx) -> {
    RedirectException redirectException = (RedirectException) exception;
    if (!Strings.isNullOrEmpty(redirectException.getSessionUrlAttribute())) {
      String requestUri = ctx.getRequest().getApplicationUriWithQuery();
      ctx.setSession(redirectException.getSessionUrlAttribute(), requestUri);
    }
    ctx.redirect(redirectException.getPath());
  });
  // set the StatusCodeException handler
  application.getErrorHandler().setExceptionHandler(StatusCodeException.class, (exception, ctx) -> {
    StatusCodeException statusCodeException = (StatusCodeException) exception;
    ctx.setLocal("message", statusCodeException.getMessage());
    application.getErrorHandler().handle(statusCodeException.getStatusCode(), ctx);
  });
}
origin: ro.pippo/pippo-metrics

@Override
public void onPostDispatch(Request request, Response response) {
  updateStatusCodeMetrics(response);
  activeRequests.dec();
}
origin: gitblit/fathom

private void initializeApplication() {
  // hook-up the Metrics dispatch listener
  MetricsDispatchListener metricsDispatchListener = new MetricsDispatchListener(metricRegistry);
  application.getRoutePreDispatchListeners().add(metricsDispatchListener);
  application.getRoutePostDispatchListeners().add(metricsDispatchListener);
  // set the RedirectException handler
  application.getErrorHandler().setExceptionHandler(RedirectException.class, (exception, ctx) -> {
    RedirectException redirectException = (RedirectException) exception;
    if (!Strings.isNullOrEmpty(redirectException.getSessionUrlAttribute())) {
      String requestUri = ctx.getRequest().getApplicationUriWithQuery();
      ctx.setSession(redirectException.getSessionUrlAttribute(), requestUri);
    }
    ctx.redirect(redirectException.getPath());
  });
  // set the StatusCodeException handler
  application.getErrorHandler().setExceptionHandler(StatusCodeException.class, (exception, ctx) -> {
    StatusCodeException statusCodeException = (StatusCodeException) exception;
    ctx.setLocal("message", statusCodeException.getMessage());
    application.getErrorHandler().handle(statusCodeException.getStatusCode(), ctx);
  });
}
ro.pippo.metricsMetricsDispatchListener

Javadoc

Collects general Request and Response metrics.

Most used methods

  • <init>
  • updateStatusCodeMetrics

Popular in Java

  • Start an intent from android
  • getSharedPreferences (Context)
  • addToBackStack (FragmentTransaction)
  • putExtra (Intent)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • JTextField (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now