Package org.eclipse.jetty.server

Examples of org.eclipse.jetty.server.Server.stop()


        processor.setContext(env);
        processor.execute();
        try {
            reshandler.stop();
        } finally {
            server.stop();
            server.destroy();
        }

    }
View Full Code Here


                        if (server.isStopping() || server.isStopped()) {
                            return;
                        }
                       
                        try {
                            server.stop();
                        } catch (final Exception e) {
                            // ignore
                        }
                       
                    }
View Full Code Here

        server.start() ;
        try { server.getServer().join() ; } catch (Exception ex) {}

        if ( mgtServer != null )
        {
            try { mgtServer.stop() ; }
            catch (Exception e) { serverLog.warn("Failed to cleanly stop the management server", e) ; }
        }
        System.exit(0) ;
    }
   
View Full Code Here

            Assertions.assertThat( service.checkRemoteConnectivity( repo.getId() ) ).isTrue();
        }
        finally
        {
            service.deleteRemoteRepository( "id-new" );
            repoServer.stop();
        }
    }

    @Test
    public void checkRemoteConnectivityEmptyRemote()
View Full Code Here

        }
        finally
        {
            service.deleteRemoteRepository( "id-new" );
            FileUtils.deleteQuietly( tmpDir );
            repoServer.stop();
        }
    }

    @Test
    public void checkRemoteConnectivityFail()
View Full Code Here

    D2RServer.storeSystemLoader(loader, context.getServletContext());
    try {
      jetty.start();
      D2RServer server = D2RServer.fromServletContext(context.getServletContext());
      if (server == null || server.errorOnStartup()) {
        jetty.stop();
        log.warn("[[[ Server startup failed, see messages above ]]]");
        return false;
      }
      log.info("[[[ Server started at " + loader.getSystemBaseURI() + " ]]]");
      return true;
View Full Code Here

          @Override
          public void stop()
          {
            try {
              server.stop();
            }
            catch (Exception e) {
              log.warn(e, "Unable to stop Jetty server.");
            }
          }
View Full Code Here

            WebClient webClient = new WebClient();
            webClient.setThrowExceptionOnFailingStatusCode(true);
            Page page = webClient.getPage("http://localhost:8080/test");
            assertEquals(testBean.getId(), page.getWebResponse().getContentAsString().trim());
        } finally {
            server.stop();
            weld.shutdown();
        }
    }

}
View Full Code Here

  try {
      System.out.println(">>> STARTING EMBEDDED JETTY SERVER, PRESS ANY KEY TO STOP");
      server.start();
      System.in.read();
      System.out.println(">>> STOPPING EMBEDDED JETTY SERVER");
      server.stop();
      server.join();
  } catch (Exception e) {
      e.printStackTrace();
      System.exit(1);
  }
View Full Code Here

            HttpClient client = new DefaultHttpClient();
            String result = client.execute( new HttpGet( "http://127.0.0.1:" + port + "/" ), new BasicResponseHandler() );
            Assert.assertEquals( APP_NAME, result.trim() );

        } finally {
            server.stop();
        }
    }

}
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.