Tabnine Logo
WingtipsRequestSpanCompletionAsyncListener.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
com.nike.wingtips.servlet.WingtipsRequestSpanCompletionAsyncListener
constructor

Best Java code snippets using com.nike.wingtips.servlet.WingtipsRequestSpanCompletionAsyncListener.<init> (Showing top 5 results out of 315)

origin: Nike-Inc/wingtips

@Override
public void setupTracingCompletionWhenAsyncRequestCompletes(
  HttpServletRequest asyncRequest,
  HttpServletResponse asyncResponse,
  TracingState originalRequestTracingState,
  HttpTagAndSpanNamingStrategy<HttpServletRequest,HttpServletResponse> tagAndNamingStrategy,
  HttpTagAndSpanNamingAdapter<HttpServletRequest,HttpServletResponse> tagAndNamingAdapter
) {
  // Async processing was started, so we have to complete it with a listener.
  asyncRequest.getAsyncContext().addListener(
    new WingtipsRequestSpanCompletionAsyncListener(
      originalRequestTracingState, tagAndNamingStrategy, tagAndNamingAdapter
    ),
    asyncRequest,
    asyncResponse
  );
}
origin: Nike-Inc/wingtips

@Test
public void constructor_sets_fields_as_expected() {
  // given
  TracingState tracingStateMock = mock(TracingState.class);
  // when
  WingtipsRequestSpanCompletionAsyncListener impl =
    new WingtipsRequestSpanCompletionAsyncListener(tracingStateMock, tagAndNamingStrategy, tagAndNamingAdapterMock);
  // then
  assertThat(impl.originalRequestTracingState).isSameAs(tracingStateMock);
  assertThat(impl.tagAndNamingStrategy).isSameAs(tagAndNamingStrategy);
  assertThat(impl.tagAndNamingAdapter).isSameAs(tagAndNamingAdapterMock);
  assertThat(impl.alreadyCompleted.get()).isFalse();
}
origin: Nike-Inc/wingtips

@Test
public void constructor_uses_default_NoOpHttpTagStrategy_if_passed_null_tag_strategy() {
  // when
  WingtipsRequestSpanCompletionAsyncListener impl =
    new WingtipsRequestSpanCompletionAsyncListener(tracingState, null, tagAndNamingAdapterMock);
  // then
  assertThat(impl.tagAndNamingStrategy).isSameAs(NoOpHttpTagStrategy.getDefaultInstance());
  assertThat(impl.originalRequestTracingState).isSameAs(tracingState);
  assertThat(impl.tagAndNamingAdapter).isSameAs(tagAndNamingAdapterMock);
}
origin: Nike-Inc/wingtips

@Test
public void constructor_uses_default_NoOpHttpTagAdapter_if_passed_null_tag_adapter() {
  // when
  WingtipsRequestSpanCompletionAsyncListener impl =
    new WingtipsRequestSpanCompletionAsyncListener(tracingState, tagAndNamingStrategy, null);
  // then
  assertThat(impl.tagAndNamingAdapter).isSameAs(NoOpHttpTagAdapter.getDefaultInstance());
  assertThat(impl.originalRequestTracingState).isSameAs(tracingState);
  assertThat(impl.tagAndNamingStrategy).isSameAs(tagAndNamingStrategy);
}
origin: Nike-Inc/wingtips

  new WingtipsRequestSpanCompletionAsyncListener(tracingState, tagAndNamingStrategy, tagAndNamingAdapterMock)
);
asyncEventMock = mock(AsyncEvent.class);
com.nike.wingtips.servletWingtipsRequestSpanCompletionAsyncListener<init>

Popular methods of WingtipsRequestSpanCompletionAsyncListener

  • completeRequestSpan
    Does the work of doing the final span tagging and naming, and completes the span for #originalReques
  • onComplete
  • onError
  • onStartAsync
  • onTimeout

Popular in Java

  • Updating database using SQL prepared statement
  • getContentResolver (Context)
  • getExternalFilesDir (Context)
  • findViewById (Activity)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Best IntelliJ plugins
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