Tabnine Logo
JettyEventListenerProxy.getOriginalListener
Code IndexAdd Tabnine to your IDE (free)

How to use
getOriginalListener
method
in
rocks.inspectit.agent.java.tracing.core.adapter.http.proxy.JettyEventListenerProxy

Best Java code snippets using rocks.inspectit.agent.java.tracing.core.adapter.http.proxy.JettyEventListenerProxy.getOriginalListener (Showing top 2 results out of 315)

origin: inspectIT/inspectIT

@Test
public void spanStoreListenerNull() {
  Proxy proxyListener = new Proxy();
  when(httpExchange.getEventListener()).thenReturn(null);
  when(runtimeLinker.createProxy(eq(JettyEventListenerProxy.class), Mockito.<JettyEventListenerProxy> any(), Mockito.<ClassLoader> any())).thenReturn(proxyListener);
  AsyncClientRequestAdapter<TextMap> adapter = sensor.getAsyncClientRequestAdapter(object, new Object[] { httpExchange }, rsc);
  adapter.getSpanStoreAdapter().setSpanStore(spanStore);
  verify(httpExchange).setEventListener(proxyListener);
  ArgumentCaptor<JettyEventListenerProxy> proxyCaptor = ArgumentCaptor.forClass(JettyEventListenerProxy.class);
  verify(runtimeLinker).createProxy(eq(JettyEventListenerProxy.class), proxyCaptor.capture(), eq(httpExchange.getClass().getClassLoader()));
  assertThat(proxyCaptor.getValue().getOriginalListener(), is(nullValue()));
  assertThat(proxyCaptor.getValue().getSpanStore(), is(spanStore));
  verifyNoMoreInteractions(runtimeLinker);
  verifyZeroInteractions(object, rsc);
}
origin: inspectIT/inspectIT

@Test
public void spanStore() {
  Object listener = new Object();
  Proxy proxyListener = new Proxy();
  when(httpExchange.getEventListener()).thenReturn(listener);
  when(runtimeLinker.createProxy(eq(JettyEventListenerProxy.class), Mockito.<JettyEventListenerProxy> any(), Mockito.<ClassLoader> any())).thenReturn(proxyListener);
  AsyncClientRequestAdapter<TextMap> adapter = sensor.getAsyncClientRequestAdapter(object, new Object[] { httpExchange }, rsc);
  adapter.getSpanStoreAdapter().setSpanStore(spanStore);
  verify(httpExchange).setEventListener(proxyListener);
  ArgumentCaptor<JettyEventListenerProxy> proxyCaptor = ArgumentCaptor.forClass(JettyEventListenerProxy.class);
  verify(runtimeLinker).createProxy(eq(JettyEventListenerProxy.class), proxyCaptor.capture(), eq(httpExchange.getClass().getClassLoader()));
  assertThat(proxyCaptor.getValue().getOriginalListener(), is(listener));
  assertThat(proxyCaptor.getValue().getSpanStore(), is(spanStore));
  verifyNoMoreInteractions(runtimeLinker);
  verifyZeroInteractions(object, rsc);
}
rocks.inspectit.agent.java.tracing.core.adapter.http.proxyJettyEventListenerProxygetOriginalListener

Javadoc

Gets #originalListener.

Popular methods of JettyEventListenerProxy

  • <init>
  • getProxyConstructorArguments
  • getSpanStore
    Gets #spanStore.
  • getStatus
  • handleThrowable
    Handling exceptional situations.
  • onConnectionFailed
    Connection failed.
  • onException
    Exception occurred.
  • onRequestCommitted
    Request committed event. This is earliest place we can start a span.
  • onResponseComplete
    Response complete event. We can finish span here.
  • onResponseStatus
    Response status event. We can capture status here.

Popular in Java

  • Creating JSON documents from java classes using gson
  • putExtra (Intent)
  • getResourceAsStream (ClassLoader)
  • getSystemService (Context)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • CodeWhisperer alternatives
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