@Override public void destroy() { logger.info("Stopping HttpServer"); this.server.stop(this.shutdownDelay); }
public void shutdown() { httpServer.stop(0); }
@Override public void run() { server.stop(0); } }));
@Override public void destroy() { logger.info("Stopping HttpServer"); this.server.stop(this.shutdownDelay); }
@Override public void shutdown() { if (hs != null) { hs.stop(0); LOG.info("Successfully stopped http server"); } }
@Override public void destroy() { super.destroy(); if (this.server != null && this.localServer) { logger.info("Stopping HttpServer"); this.server.stop(this.shutdownDelay); } }
@Override public void stop() { if (started.compareAndSet(true, false)) { LOGGER.log(Level.FINE, "Stopping JdkHttpServerTestContainer..."); this.server.stop(3); } else { LOGGER.log(Level.WARNING, "Ignoring stop request - JdkHttpServerTestContainer is already stopped."); } } }
@Override public void destroy() { super.destroy(); if (this.server != null && this.localServer) { logger.info("Stopping HttpServer"); this.server.stop(this.shutdownDelay); } }
@Override public void stop(final int i) { handler.onServerStop(); delegate.stop(i); }
/** * Stops server by closing the listening socket and disallowing any new exchanges * from being processed. * * @param delay - the maximum time in seconds to wait until exchanges have finished. */ public void stop(int delay) { httpSrv.stop(delay); }
private static void stopHTTPServer() { httpServer.stop( 2 ); } }
public void stop() { if (httpServer != null) { httpServer.stop(0); } }
@AfterClass public void tearDown() { for (HttpServer server : servers) { if (server != null) { server.stop(0); } } }
@AfterClass public void shutDown() { TEST_SERVER.stop(0); } }
@AfterClass public void tearDown() { for (Map.Entry<String, FakeSizeServer> fakeServerEntry : serverMap.entrySet()) { fakeServerEntry.getValue().httpServer.stop(0); } }
@AfterTest public void tearDownTest() { for (HttpServer server : servers) { server.stop(0); } }
@AfterClass public static void tearDownClass() throws Exception { server.stop(0); }
@AfterClass public static void tearDown() throws Exception { server.stop(0); }
@After public void teardown() throws Exception { httpsServer.stop(0); httpServer.stop(0); }
@Test public void simpleHessianServiceExporter() throws IOException { final int port = SocketUtils.findAvailableTcpPort(); TestBean tb = new TestBean("tb"); SimpleHessianServiceExporter exporter = new SimpleHessianServiceExporter(); exporter.setService(tb); exporter.setServiceInterface(ITestBean.class); exporter.setDebug(true); exporter.prepare(); HttpServer server = HttpServer.create(new InetSocketAddress(port), -1); server.createContext("/hessian", exporter); server.start(); try { HessianClientInterceptor client = new HessianClientInterceptor(); client.setServiceUrl("http://localhost:" + port + "/hessian"); client.setServiceInterface(ITestBean.class); //client.setHessian2(true); client.prepare(); ITestBean proxy = ProxyFactory.getProxy(ITestBean.class, client); assertEquals("tb", proxy.getName()); proxy.setName("test"); assertEquals("test", proxy.getName()); } finally { server.stop(Integer.MAX_VALUE); } }