Tabnine Logo
VertxResponseWriter.suspend
Code IndexAdd Tabnine to your IDE (free)

How to use
suspend
method
in
com.englishtown.vertx.jersey.impl.VertxResponseWriter

Best Java code snippets using com.englishtown.vertx.jersey.impl.VertxResponseWriter.suspend (Showing top 5 results out of 315)

origin: com.englishtown/vertx-mod-jersey

/**
 * {@inheritDoc}
 */
@Override
public void setSuspendTimeout(long timeOut, TimeUnit timeUnit) throws IllegalStateException {
  if (timeoutHandler == null) {
    throw new IllegalStateException("The timeoutHandler is null");
  }
  suspend(timeOut, timeUnit, timeoutHandler);
}
origin: com.englishtown.vertx/vertx-jersey

/**
 * {@inheritDoc}
 */
@Override
public void setSuspendTimeout(long timeOut, TimeUnit timeUnit) throws IllegalStateException {
  if (timeoutHandler == null) {
    throw new IllegalStateException("The timeoutHandler is null");
  }
  suspend(timeOut, timeUnit, timeoutHandler);
}
origin: ef-labs/vertx-jersey

/**
 * {@inheritDoc}
 */
@Override
public void setSuspendTimeout(long timeOut, TimeUnit timeUnit) throws IllegalStateException {
  if (timeoutHandler == null) {
    throw new IllegalStateException("The timeoutHandler is null");
  }
  suspend(timeOut, timeUnit, timeoutHandler);
}
origin: ef-labs/vertx-jersey

@Test
public void testSuspend() throws Exception {
  boolean result;
  ContainerResponseWriter.TimeoutHandler timeoutHandler = mock(ContainerResponseWriter.TimeoutHandler.class);
  result = writer.suspend(10, TimeUnit.SECONDS, timeoutHandler);
  assertTrue(result);
  verify(vertx, times(1)).setTimer(anyLong(), any(Handler.class));
  result = writer.suspend(0, TimeUnit.SECONDS, timeoutHandler);
  assertTrue(result);
  verify(vertx, times(1)).setTimer(anyLong(), any(Handler.class));
  result = writer.suspend(10, TimeUnit.SECONDS, timeoutHandler);
  assertTrue(result);
  verify(vertx, times(2)).setTimer(anyLong(), any(Handler.class));
}
origin: ef-labs/vertx-jersey

@Test
public void testSetSuspendTimeout() throws Exception {
  ContainerResponseWriter.TimeoutHandler timeoutHandler = mock(ContainerResponseWriter.TimeoutHandler.class);
  try {
    writer.setSuspendTimeout(10, TimeUnit.SECONDS);
    fail();
  } catch (IllegalStateException e) {
    // Expected
  }
  writer.suspend(0, TimeUnit.SECONDS, timeoutHandler);
  writer.setSuspendTimeout(5, TimeUnit.MINUTES);
  verify(vertx, times(1)).setTimer(anyLong(), any(Handler.class));
}
com.englishtown.vertx.jersey.implVertxResponseWritersuspend

Popular methods of VertxResponseWriter

  • <init>
  • end
  • commit
  • enableResponseBuffering
  • failure
  • setSuspendTimeout
  • writeResponseStatusAndHeaders

Popular in Java

  • Reading from database using SQL prepared statement
  • onCreateOptionsMenu (Activity)
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (Timer)
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Table (org.hibernate.mapping)
    A relational table
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top PhpStorm 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