congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
MetricsDispatchListener.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
ro.pippo.metrics.MetricsDispatchListener
constructor

Best Java code snippets using ro.pippo.metrics.MetricsDispatchListener.<init> (Showing top 4 results out of 315)

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: 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<init>

Popular methods of MetricsDispatchListener

  • updateStatusCodeMetrics

Popular in Java

  • Reactive rest calls using spring rest template
  • getContentResolver (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • findViewById (Activity)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • JTable (javax.swing)
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now