Package org.eclipse.jetty.server

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


                if (endpoint.isEnableJmx()) {
                    enableJmx(server);
                }
                // just set if we need sendServerVersion, the default value is true
                server.setSendServerVersion(endpoint.isSendServerVersion());
                server.addConnector(connector);

                connectorRef = new ConnectorRef(server, connector, createServletForConnector(server, connector, endpoint.getHandlers(), endpoint));
                // must enable session before we start
                if (endpoint.isSessionSupport()) {
                    enableSessionSupport(connectorRef.server, connectorKey);
View Full Code Here


                // Create Server and add connector
                server = createServer();
                if (endpoint.isEnableJmx()) {
                    enableJmx(server);
                }
                server.addConnector(connector);

                // Create ServletContextHandler
                ServletContextHandler context = createContext(server, connector, endpoint.getHandlers());
                // setup the WebSocketComponentServlet initial parameters
                setWebSocketComponentServletInitialParameter(context, endpoint);
View Full Code Here

    protected Server createStaticResourcesServer(ServletContextHandler context, String host, int port, String home) throws Exception {
        Server server = new Server();
        Connector connector = new SelectChannelConnector();
        connector.setHost(host);
        connector.setPort(port);
        server.addConnector(connector);
        return createStaticResourcesServer(server, context, home);
    }

    protected WebsocketComponentServlet addServlet(NodeSynchronization sync, WebsocketProducer producer, String remaining) throws Exception {
View Full Code Here

                // Create Server and add connector
                server = createServer();
                if (endpoint.isEnableJmx()) {
                    enableJmx(server);
                }
                server.addConnector(connector);

                // Create ServletContextHandler
                ServletContextHandler context = createContext(server, connector, endpoint.getHandlers());
                // setup the WebSocketComponentServlet initial parameters
                setWebSocketComponentServletInitialParameter(context, endpoint);
View Full Code Here

    protected Server createStaticResourcesServer(ServletContextHandler context, String host, int port, String home) throws Exception {
        Server server = new Server();
        Connector connector = new SelectChannelConnector();
        connector.setHost(host);
        connector.setPort(port);
        server.addConnector(connector);
        return createStaticResourcesServer(server, context, home);
    }

    protected WebsocketComponentServlet addServlet(NodeSynchronization sync, WebsocketProducer producer, String remaining) throws Exception {
View Full Code Here

                    enableJmx(server);
                }
                // This setting is only work for the first endpoint which create the server
                // just set if we need sendServerVersion, the default value is true
                server.setSendServerVersion(endpoint.isSendServerVersion());
                server.addConnector(connector);
                server.setSendDateHeader(endpoint.isSendDateHeader());

                connectorRef = new ConnectorRef(server, connector, createServletForConnector(server, connector, endpoint.getHandlers(), endpoint));
                // must enable session before we start
                if (endpoint.isSessionSupport()) {
View Full Code Here

    connector.setPort(port);
    connector.setReuseAddress(false);
    connector.setSoLingerTime(0);

    Server newServer = new Server();
    newServer.addConnector(connector);

    ServletContextHandler newHandler = new ServletContextHandler(ServletContextHandler.SESSIONS);
    newHandler.setContextPath("/");
    newHandler.addServlet(new ServletHolder(new HttpServlet() {
      @Override
View Full Code Here

        }
        if (params.securePort < 1024 && !isWindows()) {
          logger.warn("Gitblit needs to run with ROOT permissions for ports < 1024!");
        }

        server.addConnector(connector);
      } else {
        logger.warn("Failed to find or load Keystore?");
        logger.warn("HTTPS transport DISABLED.");
      }
    }
View Full Code Here

      }
      if (params.port < 1024 && !isWindows()) {
        logger.warn("Gitblit needs to run with ROOT permissions for ports < 1024!");
      }

      server.addConnector(connector);
    }

    // tempDir is where the embedded Gitblit web application is expanded and
    // where Jetty creates any necessary temporary files
    File tempDir = com.gitblit.utils.FileUtils.resolveParameter(Constants.baseFolder$, baseFolder, params.temp);
View Full Code Here

  public static void main(String[] args) {
    Server server = new Server();

    SocketConnector connector = new SocketConnector();
    connector.setPort(9999);
    server.addConnector(connector);

    ServletContextHandler handler = new ServletContextHandler(ServletContextHandler.SESSIONS);
    handler.setContextPath("/");
    handler.addServlet(RequestFactoryServlet.class, "/gwtRequest");
    handler.addFilter(GzipFilter.class, "/*", EnumSet.allOf(DispatcherType.class));
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.