Package org.crsh.vfs.spi.url

Examples of org.crsh.vfs.spi.url.ClassPathMountFactory


      @Argument(name = "port")
      Integer port) throws Exception {

    //
    FileMountFactory fileDriver = new FileMountFactory(Utils.getCurrentDirectory());
    ClassPathMountFactory classpathDriver = new ClassPathMountFactory(Thread.currentThread().getContextClassLoader());

    //
    FS cmdFS = new FS.Builder().register("file", fileDriver).register("classpath", classpathDriver).mount(cmd).build();
    FS confFS = new FS.Builder().register("file", fileDriver).register("classpath", classpathDriver).mount(conf).build();
    Bootstrap bootstrap = new Bootstrap(Thread.currentThread().getContextClassLoader(), confFS, cmdFS);
View Full Code Here


    return sb.toString();
  }

  private FS.Builder createBuilder() throws IOException {
    FileMountFactory fileDriver = new FileMountFactory(Utils.getCurrentDirectory());
    ClassPathMountFactory classpathDriver = new ClassPathMountFactory(Thread.currentThread().getContextClassLoader());
    return new FS.Builder().register("file", fileDriver).register("classpath", classpathDriver);
  }
View Full Code Here

  public FS mount(ClassLoader cl, Path path) throws IOException, URISyntaxException {
    if (cl == null) {
      throw new NullPointerException();
    } else {
      return mount(new ClassPathMountFactory(cl).create(path).getDriver());
    }
  }
View Full Code Here

  public void afterPropertiesSet() throws Exception {

    // Initialise the registerable drivers
    try {
      drivers.put("classpath", new ClassPathMountFactory(loader));
      drivers.put("file", new FileMountFactory(Utils.getCurrentDirectory()));
    }
    catch (Exception e) {
      log.log(Level.SEVERE, "Coult not initialize classpath driver", e);
      return;
View Full Code Here

    // Use JVM properties as external config
    setConfig(System.getProperties());

    // Initialise the registerable drivers
    try {
      mountContexts.put("classpath", new ClassPathMountFactory(context.getClassLoader()));
      mountContexts.put("file", new FileMountFactory(Utils.getCurrentDirectory()));
      mountContexts.put("war", new WarMountFactory(context));
    }
    catch (Exception e) {
      log.log(Level.SEVERE, "Coult not initialize classpath driver", e);
View Full Code Here

TOP

Related Classes of org.crsh.vfs.spi.url.ClassPathMountFactory

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.