Examples of HttpServerHelper


Examples of com.noelios.restlet.http.HttpServerHelper

   * @param request
   *            The HTTP Servlet request.
   * @return The HTTP server handling calls.
   */
  public HttpServerHelper getServer(HttpServletRequest request) {
    HttpServerHelper result = this.helper;

    if (result == null) {
      synchronized (ServerServlet.class) {
        // Find the attribute name to use to store the server reference
        String serverAttributeName = getInitParameter(
View Full Code Here

Examples of com.noelios.restlet.http.HttpServerHelper

   *            The HTTP Servlet response.
   */
  @Override
  public void service(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {
    HttpServerHelper helper = getServer(request);

    if (helper != null) {
      helper
          .handle(new ServletCall(helper.getServer(), request,
              response));
    } else {
      log("[Noelios Restlet Engine] - Unable to get the Restlet HTTP server connector. Status code 500 returned.");
      response.sendError(500);
    }
View Full Code Here

Examples of org.restlet.engine.connector.HttpServerHelper

public class HttpInboundRequestTestCase extends RestletTestCase {

    public void testRequestUri() throws Exception {
        Engine.register(false);
        Engine.getInstance().getRegisteredServers()
                .add(new HttpServerHelper(null));
        Server server = new Server(new Context(), Protocol.HTTP, 0);
        server.start();

        HttpServerHelper hsh = (HttpServerHelper) server.getContext()
                .getAttributes().get("org.restlet.engine.helper");
        Connection<Server> c = hsh.getConnectionPool().checkout();

        HttpInboundRequest hir = new HttpInboundRequest(server.getContext(), c,
                "GET",
                "/control/accounts/netdev/subscriptions/emily/preferences",
                "HTTP/1.1");
View Full Code Here

Examples of org.restlet.engine.connector.HttpServerHelper

        org.restlet.engine.Engine.register();
    }

    public void testInternalAndApache() throws Exception {
        if (this.enabledServerInternal && this.enabledClientApache) {
            runTest(new HttpServerHelper(null),
                    new org.restlet.ext.httpclient.HttpClientHelper(null));
        }
    }
View Full Code Here

Examples of org.restlet.engine.connector.HttpServerHelper

        }
    }

    public void testInternalAndInternal() throws Exception {
        if (this.enabledServerInternal && this.enabledClientInternal) {
            runTest(new HttpServerHelper(null), new HttpClientHelper(null));
        }
    }
View Full Code Here

Examples of org.restlet.engine.connector.HttpServerHelper

        }
    }

    public void testInternalAndJdkNet() throws Exception {
        if (this.enabledServerInternal && this.enabledClientJdkNet) {
            runTest(new HttpServerHelper(null),
                    new org.restlet.ext.net.HttpClientHelper(null));
        }
    }
View Full Code Here

Examples of org.restlet.ext.jetty.HttpServerHelper

     */
    public JettyHandler(Server server, boolean secure) {
        if (secure) {
            this.helper = new HttpsServerHelper(server);
        } else {
            this.helper = new HttpServerHelper(server);
        }
    }
View Full Code Here

Examples of org.restlet.ext.simple.HttpServerHelper

            Server server = new Server(Protocol.HTTP, 8111);                    
            component.getServers().add(server);
            server.getContext().getParameters().add("maxTotalConnections", "50");
            //end TODO
            Engine.getInstance().getRegisteredServers().clear();
            Engine.getInstance().getRegisteredServers().add(new HttpServerHelper(server));
            component.getClients().add(Protocol.FILE);               
            component.getDefaultHost().attach(new FreedomRestServer());
            component.start();
    }   
View Full Code Here

Examples of org.restlet.ext.simple.HttpServerHelper

            });
           
            guard.setNext(new FreedomRestServer(Info.getResourcesPath()));
           
            Engine.getInstance().getRegisteredServers().clear();
            Engine.getInstance().getRegisteredServers().add(new HttpServerHelper(server));
            component.getClients().add(Protocol.FILE);
            component.getDefaultHost().attachDefault(guard);
            //component.getDefaultHost().attach(new FreedomRestServer(Info.getResourcesPath()));
            component.start();
            freedomoticApi = getApi();
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.