Examples of stop()


Examples of org.springframework.jms.listener.DefaultMessageListenerContainer.stop()

        messageListenerContainer.afterPropertiesSet();

        messageListenerContainer.start();

        countDownLatch.await();
        messageListenerContainer.stop();
        messageListenerContainer.destroy();

        assertFalse("no message has redelivery > 1", messageRedelivered.get());
    }
View Full Code Here

Examples of org.springframework.scheduling.TestMethodInvokingTask.stop()

      // fall through
    }

    if (concurrent) {
      assertEquals(2, task1.counter);
      task1.stop();
      // we're done, both jobs have ran, let's call it a day
      return;
    }
    else {
      assertEquals(1, task1.counter);
View Full Code Here

Examples of org.springframework.util.StopWatch.stop()

      watch = new StopWatch();
      watch.start();
    }   
    threadPool.execute(task);
   
    if (log.isDebug()) watch.stop();
    if (log.isDebug()) log.debug("Current size of queue is: "+queue.size()+". Running last task took (ms): "+watch.getTotalTimeMillis());
  }

  public void shutDown() {
    // Initiates orderly shutdown and don't accept creation of new threads
View Full Code Here

Examples of org.springframework.web.context.support.XmlWebApplicationContext.stop()

    }

    public void contextDestroyed(ServletContextEvent event) {
        XmlWebApplicationContext context = (XmlWebApplicationContext)WebApplicationContextUtils.getWebApplicationContext(event.getServletContext());
        if (context != null) {
            context.stop();
            context.destroy();
        }
        // do nothing, since the context is destoyed anyway
    }
View Full Code Here

Examples of org.springside.modules.metrics.Timer.TimerContext.stop()

      // 使用Dozer转换DTO类,并补充Dozer不能自动绑定的属性
      UserDTO dto = BeanMapper.map(user, UserDTO.class);
      dto.setTeamId(user.getTeam().getId());
      return dto;
    } finally {
      exectuionTimer.stop();
    }
  }
}
View Full Code Here

Examples of org.springside.modules.metrics.reporter.ReportScheduler.stop()

  @Test
  public void schedulerStartStop() throws InterruptedException {
    ReportScheduler scheduler = new ReportScheduler(new MetricRegistry(), new ConsoleReporter());
    scheduler.start(1, TimeUnit.SECONDS);
    Thread.sleep(2000);
    scheduler.stop();
  }

  private void runReport(Reporter reporter) {
    MetricRegistry metricRegistry = new MetricRegistry();
    MockClock clock = new MockClock();
View Full Code Here

Examples of org.springside.modules.nosql.redis.service.elector.MasterElector.stop()

      System.out.println("Hit enter to stop.");
      while (true) {
        char c = (char) System.in.read();
        if (c == '\n') {
          System.out.println("Shuting down");
          masterElector.stop();
          return;
        }
      }
    } finally {
      pool.destroy();
View Full Code Here

Examples of org.springside.modules.nosql.redis.service.scheduler.JobDispatcher.stop()

      System.out.println("Hit enter to stop.");
      while (true) {
        char c = (char) System.in.read();
        if (c == '\n') {
          System.out.println("Shuting down");
          dispatcher.stop();
          stopPrintStatistics();
          return;
        }
      }
    } finally {
View Full Code Here

Examples of org.subethamail.smtp.server.SMTPServer.stop()

      client.to("jane@example.org");
      client.quit();
    }
    finally
    {
      smtpServer.stop();
    }
  }
}
View Full Code Here

Examples of org.subethamail.wiser.Wiser.stop()

    Thread.sleep(2000);

    writer.print("HELO bar\r\n");
    assert(writer.checkError());

    wiser.stop();
  }

  /** */
  public static Test suite()
  {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.