Package ratpack.launch

Examples of ratpack.launch.HandlerFactory


  private static Function<Stopper, ChannelInitializer<SocketChannel>> buildChannelInitializer(final LaunchConfig launchConfig) {
    return stopper -> new RatpackChannelInitializer(launchConfig, createHandler(launchConfig), stopper);
  }

  private static Handler createHandler(final LaunchConfig launchConfig) {
    final HandlerFactory handlerFactory = launchConfig.getHandlerFactory();

    if (launchConfig.isDevelopment()) {
      File classFile = ClassUtil.getClassFile(handlerFactory);
      if (classFile != null) {
        Factory<Handler> factory = new ReloadableFileBackedFactory<>(classFile.toPath(), true, (file, bytes) -> createHandler(launchConfig, handlerFactory));
View Full Code Here


      List<String> compressionMimeTypeBlackList = props.asList(COMPRESSION_MIME_TYPE_BLACK_LIST);

      Map<String, String> otherProperties = Maps.newHashMap();
      PropertiesUtil.extractProperties("other.", properties, otherProperties);

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

TOP

Related Classes of ratpack.launch.HandlerFactory

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.