Package org.stagemonitor.requestmonitor

Examples of org.stagemonitor.requestmonitor.RequestMonitor$RequestInformation


  private final List<HtmlInjector> htmlInjectors = new ArrayList<HtmlInjector>();
  private boolean atLeastServletApi3 = false;
  private final MonitoredHttpRequestFactory monitoredHttpRequestFactory;

  public HttpRequestMonitorFilter() {
    this(Stagemonitor.getConfiguration(), new RequestMonitor(Stagemonitor.getConfiguration()), Stagemonitor.getMetricRegistry());
  }
View Full Code Here


    when(configuration.getConfig(WebPlugin.class)).thenReturn(webPlugin);
    when(configuration.getConfig(CorePlugin.class)).thenReturn(corePlugin);
    when(corePlugin.isStagemonitorActive()).thenReturn(true);
    when(requestMonitorPlugin.isCollectRequestStats()).thenReturn(true);
    when(webPlugin.getGroupUrls()).thenReturn(Collections.singletonMap(Pattern.compile("(.*).js$"), "*.js"));
    requestMonitor = new RequestMonitor(corePlugin, registry, requestMonitorPlugin);
    springMVCRequestNameDeterminerAspect = Mockito.spy(new SpringMVCRequestNameDeterminerAspect(mvcPlugin, webPlugin));
  }
View Full Code Here

    when(servlet3Context.getMajorVersion()).thenReturn(3);
    when(servlet3Context.getContextPath()).thenReturn("");
    when(servlet3Context.addServlet(anyString(), any(Servlet.class))).thenReturn(mock(ServletRegistration.Dynamic.class));
    final FilterConfig filterConfig = spy(new MockFilterConfig());
    when(filterConfig.getServletContext()).thenReturn(servlet3Context);
    final RequestMonitor requestMonitor = mock(RequestMonitor.class);
    when(requestMonitor.monitor(any(MonitoredRequest.class))).then(new Answer<RequestMonitor.RequestInformation<?>>() {
      @Override
      public RequestMonitor.RequestInformation<?> answer(InvocationOnMock invocation) throws Throwable {
        MonitoredRequest<?> request = (MonitoredRequest<?>) invocation.getArguments()[0];
        request.execute();
        when(requestTrace.toJson()).thenReturn("");
View Full Code Here

TOP

Related Classes of org.stagemonitor.requestmonitor.RequestMonitor$RequestInformation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.