Package com.yammer.dropwizard.config

Examples of com.yammer.dropwizard.config.HttpConfiguration


        return serverFactory.buildServer(environment);
    }

    private ServerFactory getServerFactory(AbstractService<T> service, T configuration) {
        HttpConfiguration httpConfig = configuration.getHttpConfiguration();
        return new ServerFactory(httpConfig, service.getName());
    }
View Full Code Here


    @Override
    protected void run(Environment environment, Namespace namespace, T configuration) throws Exception {
        Preconditions.checkArgument(!configuration.getHttpConfiguration().getRootPath().equals("/"), "Dropwizard must be running on a non-root path");

        final HttpConfiguration nonSSLConfig = new HttpConfiguration();
        nonSSLConfig.setPort(8080);
        nonSSLConfig.setRootPath(configuration.getHttpConfiguration().getRootPath());
        nonSSLConfig.setConnectorType(HttpConfiguration.ConnectorType.NONBLOCKING);

        final DebugServer debug = new DebugServer(configuration, nonSSLConfig.getPort(), nonSSLConfig.getRootPath());
        final int debugPort = debug.run();

        final Server server = new ServerFactory(nonSSLConfig,
                environment.getName()).buildServer(environment);

        logBanner(environment.getName(), logger);

        try {
            server.start();
            for (ServerLifecycleListener listener : environment.getServerListeners()) {
                listener.serverStarted(server);
            }
        } catch (Exception e) {
            logger.error("Unable to start server, shutting down", e);
            server.stop();
            debug.stop();
        }

        logger.info("====> Running in Hybrid Debug mode - port " + debugPort + " will proxy between GWT and DropWizard; port "
                + nonSSLConfig.getPort() + " will hit regular compiled app");
        logger.info("Now start gwt in hosted mode using gwt:run or gwt:debug");
    }
View Full Code Here

TOP

Related Classes of com.yammer.dropwizard.config.HttpConfiguration

Copyright © 2018 www.massapicom. 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.