Tabnine Logo
ApacheClientExchangeHandlerHook
Code IndexAdd Tabnine to your IDE (free)

How to use
ApacheClientExchangeHandlerHook
in
rocks.inspectit.agent.java.sensor.method.async.http

Best Java code snippets using rocks.inspectit.agent.java.sensor.method.async.http.ApacheClientExchangeHandlerHook (Showing top 6 results out of 315)

origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
protected void initHook(Map<String, Object> parameters) {
  hook = new ApacheClientExchangeHandlerHook();
}
origin: inspectIT/inspectIT

  @Test
  public void missingHttpContext() {
    hook.beforeBody(5L, 10L, handler, null, rsc);
    verifyZeroInteractions(rsc);
  }
}
origin: inspectIT/inspectIT

  @Test
  public void successful() {
    Object result = mock(Object.class);
    hook.firstAfterBody(5L, 10L, handler, null, result, false, rsc);
    verifyZeroInteractions(rsc, result);
  }
}
origin: inspectIT/inspectIT

  @Test
  public void successful() {
    ICoreService coreService = mock(ICoreService.class);
    Object result = mock(Object.class);
    hook.secondAfterBody(coreService, 5L, 10L, handler, null, result, false, rsc);
    verifyZeroInteractions(coreService, rsc, result);
  }
}
origin: inspectIT/inspectIT

@Test
public void noSpanStore() {
  HttpContext context = mock(HttpContext.class);
  handler.localContext = context;
  hook.beforeBody(5L, 10L, handler, null, rsc);
  verify(context).getAttribute(SpanStoreAdapter.Constants.ID);
  verifyNoMoreInteractions(context);
  verifyZeroInteractions(rsc);
}
origin: inspectIT/inspectIT

@Test
public void successful() {
  SpanStore spanStore = mock(SpanStore.class);
  HttpContext context = mock(HttpContext.class);
  when(context.getAttribute(SpanStoreAdapter.Constants.ID)).thenReturn(spanStore);
  handler.localContext = context;
  hook.beforeBody(5L, 10L, handler, null, rsc);
  verify(context).getAttribute(SpanStoreAdapter.Constants.ID);
  verify(spanStore).startSpan();
  verifyNoMoreInteractions(spanStore, context);
  verifyZeroInteractions(rsc);
}
rocks.inspectit.agent.java.sensor.method.async.httpApacheClientExchangeHandlerHook

Javadoc

Sensor hook for hooking into the generation of asynchronous HTTP requests in order to be able to start spans for tracing purpose.

Thereto, the method generateRequest of the Apache's org.apache.http.impl.nio.client.AbstractClientExchangeHandler class will be instrumented.

Most used methods

  • <init>
  • beforeBody
  • firstAfterBody
  • secondAfterBody

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (ScheduledExecutorService)
  • requestLocationUpdates (LocationManager)
  • compareTo (BigDecimal)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Notification (javax.management)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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