Examples of JettyServer


Examples of org.apache.abdera.protocol.server.test.JettyServer

    private static String BASE = "http://localhost:9002/atom";

    @BeforeClass
    public static void setUp() throws Exception {
        try {
            server = new JettyServer();
            server.start(CustomProvider.class);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here

Examples of org.apache.abdera.protocol.server.test.JettyServer

  private static AbderaClient client = new AbderaClient();

  @BeforeClass
  public static void setUp() throws Exception {
    if (server == null) {
      server = new JettyServer();
      server.start(BasicProvider.class);
    }
  }
View Full Code Here

Examples of org.apache.abdera.protocol.server.test.JettyServer

  private static String BASE = "http://localhost:9002/atom";
 
  @BeforeClass
  public static void setUp() throws Exception {
    try {
      server = new JettyServer();
      server.start(CustomProvider.class);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

Examples of org.apache.http.benchmark.jetty.JettyServer

       
        URL target = new URL("http", "localhost", PORT, "/rnd?c=2048");
        config.setUrl(target);
       
        Benchmark benchmark = new Benchmark();
        benchmark.run(new JettyServer(PORT), config);
        benchmark.run(new HttpCoreServer(PORT), config);
        benchmark.run(new JettyNIOServer(PORT), config);
        benchmark.run(new HttpCoreNIOServer(PORT), config);
    }
View Full Code Here

Examples of org.apache.http.benchmark.jetty.JettyServer

        URL target = new URL("http", "localhost", PORT, "/rnd?c=2048");
        config.setUrl(target);

        Benchmark benchmark = new Benchmark();
        benchmark.run(new JettyServer(PORT), config);
        benchmark.run(new HttpCoreServer(PORT), config);
        benchmark.run(new JettyNIOServer(PORT), config);
        benchmark.run(new HttpCoreNIOServer(PORT), config);
    }
View Full Code Here

Examples of org.apache.tuscany.sca.http.jetty.JettyServer

        final NodeFactory nf = NodeFactory.newInstance();
        node = nf.createNode("test.composite", new Contribution("test", here()));
        node.start();
       
        // Mock up a test Web service on http://localhost:8086/wsupper
        jetty = new JettyServer((ExtensionPointRegistry)nf.getExtensionPointRegistry());
        jetty.start();
        jetty.addServletMapping("http://localhost:8086/wsupper", new HttpServlet() {
            private static final long serialVersionUID = 1L;
            protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
                assertTrue(read(req.getInputStream()).contains("Hello SOAP"));
View Full Code Here

Examples of org.apache.tuscany.sca.http.jetty.JettyServer

        // Register a Jetty servlet host
        ServletHostExtensionPoint servletHosts =
            extensionPointRegistry.getExtensionPoint(ServletHostExtensionPoint.class);
        WorkScheduler workScheduler = extensionPointRegistry.getExtensionPoint(WorkScheduler.class);
        server = new JettyServer(workScheduler);
        servletHosts.addServletHost(server);
    }
View Full Code Here

Examples of org.apache.tuscany.sca.http.jetty.JettyServer

        final NodeFactory nf = NodeFactory.newInstance();
        node = nf.createNode(new Contribution("test", here()));
        node.start();
       
        // Mock up a test Web service on http://localhost:8086/wsupper
        jetty = new JettyServer((ExtensionPointRegistry)nf.getExtensionPointRegistry());
        jetty.start();
        jetty.addServletMapping("http://localhost:8086/wsupper", new HttpServlet() {
            private static final long serialVersionUID = 1L;
            protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
                assertTrue(read(req.getInputStream()).contains("Hello SOAP"));
View Full Code Here

Examples of org.apache.tuscany.sca.http.jetty.JettyServer

        // Register a Jetty servlet host
        ServletHostExtensionPoint servletHosts =
            extensionPointRegistry.getExtensionPoint(ServletHostExtensionPoint.class);
        WorkScheduler workScheduler = extensionPointRegistry.getExtensionPoint(WorkScheduler.class);
        server = new JettyServer(workScheduler);
        servletHosts.addServletHost(server);
        server.init();
    }
View Full Code Here

Examples of org.apache.tuscany.sca.http.jetty.JettyServer

            final WorkScheduler workScheduler = utilities.getUtility(WorkScheduler.class);
            // Allow privileged access to start MBeans. Requires MBeanPermission in security policy.
            try {
                server = AccessController.doPrivileged(new PrivilegedAction<JettyServer>() {
                    public JettyServer run() {
                        return new JettyServer(workScheduler);
                     }
                });       
                servletHosts.addServletHost(server);
            } catch (Exception e) {
                logger.log(Level.WARNING, "Exception creating JettyServer", e);
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.