congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
JettyEventListenerProxy.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
rocks.inspectit.agent.java.tracing.core.adapter.http.proxy.JettyEventListenerProxy
constructor

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

origin: inspectIT/inspectIT

@BeforeMethod
public void init() {
  // can not use @InjectMocks as span store gets injected to listener place
  proxy = new JettyEventListenerProxy(null, spanStore);
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
public void setSpanStore(SpanStore spanStore) {
  // get original request listener
  Object originalListener = cache.invokeMethod(jettyHttpExchange.getClass(), "getEventListener", new Class<?>[] {}, jettyHttpExchange, new Object[] {}, null);
  // create proxy for this listener
  JettyEventListenerProxy listenerProxy = new JettyEventListenerProxy(originalListener, spanStore);
  Object proxyObject = runtimeLinker.createProxy(JettyEventListenerProxy.class, listenerProxy, jettyHttpExchange.getClass().getClassLoader());
  // find the interface event listener interface, it's in the super-class of the proxy
  Class<?> eventListenerClass = proxyObject.getClass().getSuperclass().getInterfaces()[0];
  // replace with our listener
  cache.invokeMethod(jettyHttpExchange.getClass(), "setEventListener", new Class<?>[] { eventListenerClass }, jettyHttpExchange, new Object[] { proxyObject }, null);
}
origin: inspectIT/inspectIT

  @Test
  public void listenerProvided() {
    Object originalListener = new Object();
    proxy = new JettyEventListenerProxy(originalListener, spanStore);
    Object[] args = proxy.getProxyConstructorArguments();
    assertThat(args, is(new Object[] { originalListener, Boolean.TRUE }));
  }
}
rocks.inspectit.agent.java.tracing.core.adapter.http.proxyJettyEventListenerProxy<init>

Popular methods of JettyEventListenerProxy

  • getOriginalListener
    Gets #originalListener.
  • 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

  • Reading from database using SQL prepared statement
  • notifyDataSetChanged (ArrayAdapter)
  • startActivity (Activity)
  • scheduleAtFixedRate (Timer)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Notification (javax.management)
  • JFrame (javax.swing)
  • Top plugins for WebStorm
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