Examples of ServerConnector


Examples of com.vaadin.client.ServerConnector

    public ComponentConnector getScrollingBoundary(ComponentConnector connector) {
        LayoutDependency dependency = getDependency(connector.getConnectorId(),
                HORIZONTAL);
        if (!dependency.scrollingParentCached) {
            ServerConnector parent = dependency.connector.getParent();
            if (parent instanceof MayScrollChildren) {
                dependency.scrollingBoundary = connector;
            } else if (parent instanceof ComponentConnector) {
                dependency.scrollingBoundary = getScrollingBoundary((ComponentConnector) parent);
            } else {
View Full Code Here

Examples of com.vaadin.client.ServerConnector

            if (!isUndefinedInDirection(connector, direction)) {
                needsSize.push(connector.getConnectorId());
            }
            if (!isRelativeInDirection(connector, direction)) {
                ServerConnector parent = connector.getParent();
                if (parent instanceof ComponentConnector) {
                    needsSize.push(parent.getConnectorId());
                }
            }

            return needsSize;
        }
View Full Code Here

Examples of com.vaadin.client.ServerConnector

         * @return
         */
        private LayoutDependency findPotentiallyChangedScrollbar() {
            ComponentConnector currentConnector = connector;
            while (true) {
                ServerConnector parent = currentConnector.getParent();
                if (!(parent instanceof ComponentConnector)) {
                    return null;
                }
                if (parent instanceof MayScrollChildren) {
                    return getDependency(currentConnector.getConnectorId(),
View Full Code Here

Examples of org.eclipse.jetty.server.ServerConnector

{

    public static void main(String[] args) throws Exception
    {
        Server server = new Server(8080);
        ServerConnector connector = server.getBean(ServerConnector.class);
        HttpConfiguration config = connector.getBean(HttpConnectionFactory.class).getHttpConfiguration();
        config.setSendDateHeader(true);
        config.setSendServerVersion(true);

        ServletContextHandler context = new ServletContextHandler(ServletContextHandler.NO_SECURITY|ServletContextHandler.NO_SESSIONS);
        context.setContextPath("/");
View Full Code Here

Examples of org.eclipse.jetty.server.ServerConnector

    @BeforeClass
    public static void setup() {
        testUtil = new SparkTestUtil(PORT);

        final Server server = new Server();
        ServerConnector connector = new ServerConnector(server);

        // Set some timeout options to make debugging easier.
        connector.setIdleTimeout(1000 * 60 * 60);
        connector.setSoLingerTime(-1);
        connector.setPort(PORT);
        server.setConnectors(new Connector[] {connector});

        WebAppContext bb = new WebAppContext();
        bb.setServer(server);
        bb.setContextPath(SOMEPATH);
View Full Code Here

Examples of org.eclipse.jetty.server.ServerConnector

                logger.error("Could not get first available port (port set to 0), using default: {}", SPARK_DEFAULT_PORT);
                port = SPARK_DEFAULT_PORT;
            }
        }

        ServerConnector connector;

        if (keystoreFile == null) {
            connector = createSocketConnector();
        } else {
            connector = createSecureSocketConnector(keystoreFile,
                                                    keystorePassword, truststoreFile, truststorePassword);
        }

        // Set some timeout options to make debugging easier.
        connector.setIdleTimeout(TimeUnit.HOURS.toMillis(1));
        connector.setSoLingerTime(-1);
        connector.setHost(host);
        connector.setPort(port);

        server = connector.getServer();
        server.setConnectors(new Connector[] {connector});

        // Handle static file routes
        if (staticFilesFolder == null && externalFilesFolder == null) {
            server.setHandler(handler);
View Full Code Here

Examples of org.eclipse.jetty.server.ServerConnector

            sslContextFactory.setTrustStorePath(truststoreFile);
        }
        if (truststorePassword != null) {
            sslContextFactory.setTrustStorePassword(truststorePassword);
        }
        return new ServerConnector(new Server(), sslContextFactory);
    }
View Full Code Here

Examples of org.eclipse.jetty.server.ServerConnector

     * Creates an ordinary, non-secured Jetty server connector.
     *
     * @return - a server connector
     */
    private static ServerConnector createSocketConnector() {
        return new ServerConnector(new Server());
    }
View Full Code Here

Examples of org.eclipse.jetty.server.ServerConnector

        COUNTER_2.inc();

        final ThreadPool threadPool = new InstrumentedQueuedThreadPool(REGISTRY);
        final Server server = new Server(threadPool);

        final Connector connector = new ServerConnector(server,
                                                        new InstrumentedConnectionFactory(new HttpConnectionFactory(),
                                                                                          REGISTRY.timer("http.connection")));
        server.addConnector(connector);

        final ServletContextHandler context = new ServletContextHandler();
View Full Code Here

Examples of org.eclipse.jetty.server.ServerConnector

      httpConf.setSecurePort(actorExtractor.extract().getHost()
          .getWebPort());
      // httpConf.setOutputBufferSize(32768);

      // HTTP connector
      final ServerConnector http = new ServerConnector(server,
          new HttpConnectionFactory(httpConf));
      http.setHost(actorExtractor.extract().getHost().getWebHostLocal());
      http.setPort(actorExtractor.extract().getHost().getWebPortLocal());
      // http.setIdleTimeout(30000);

      // HTTPS Configuration
      final HttpConfiguration httpsConf = new HttpConfiguration(httpConf);
      httpsConf.addCustomizer(new SecureRequestCustomizer());

      // HTTPS connector
      final ServerConnector https = new ServerConnector(server,
          new SslConnectionFactory(sslCnxt, "http/1.1"),
          new HttpConnectionFactory(httpsConf));
      https.setHost(actorExtractor.extract().getHost().getWebHost());
      https.setPort(actorExtractor.extract().getHost().getWebPort());

      server.setConnectors(new Connector[] { http, https });

      // Serve via servlet
      final EnumSet<DispatcherType> dispatchers = EnumSet.range(
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.