Package ratpack.launch

Examples of ratpack.launch.LaunchConfigBuilder


        handlerFactory = handlerFactoryClass.newInstance();
      } catch (Exception e) {
        throw new LaunchException("Could not instantiate handler factory: " + handlerFactoryClass.getName(), e);
      }

      LaunchConfigBuilder launchConfigBuilder = LaunchConfigBuilder.baseDir(data.getBaseDir())
        .port(port)
        .address(address)
        .publicAddress(publicAddress)
        .development(development)
        .threads(threads)
        .maxContentLength(maxContentLength)
        .timeResponses(timeResponses)
        .compressResponses(compressResponses)
        .compressionMinSize(compressionMinSize)
        .compressionWhiteListMimeTypes(compressionMimeTypeWhiteList)
        .compressionBlackListMimeTypes(compressionMimeTypeBlackList)
        .indexFiles(indexFiles)
        .defaultRegistry(data.getDefaultRegistry());

      if (sslKeystore != null) {
        try (InputStream stream = sslKeystore) {
          launchConfigBuilder.ssl(SSLContexts.sslContext(stream, sslKeystorePassword));
        }
      }

      return launchConfigBuilder
        .other(otherProperties)
        .build(handlerFactory);

    } catch (Exception e) {
      if (e instanceof LaunchException) {
View Full Code Here


    return new LaunchConfigEmbeddedApp() {
      @Override
      protected LaunchConfig createLaunchConfig() {
        final SpecWrapper spec = new SpecWrapper();
        configureDelegateFirst(spec.getSpec(), closure);
        LaunchConfigBuilder launchConfigBuilder;

        if (spec.baseDirSupplier != null) {
          Path baseDirPath = spec.baseDirSupplier.get();
          launchConfigBuilder = LaunchConfigBuilder.baseDir(baseDirPath);
        } else {
          launchConfigBuilder = LaunchConfigBuilder.noBaseDir();
        }

        configureDelegateFirst(launchConfigBuilder.port(0), spec.launchConfig);

        final Action<? super BindingsSpec> bindingsAction = bindingsSpec -> configureDelegateFirst(new DefaultGroovyBindingsSpec(bindingsSpec), spec.bindings);

        return launchConfigBuilder.build(launchConfig -> {

          Guice.Builder builder = Guice.builder(launchConfig);
          if (spec.parentInjector != null) {
            builder.parent(spec.parentInjector);
          }
View Full Code Here

TOP

Related Classes of ratpack.launch.LaunchConfigBuilder

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.