Package org.stringtree.finder

Examples of org.stringtree.finder.StringKeeper


      context.get(MojasefConstants.MOUNTPOINT);
  }

  private static Object dx(StringCollector collector, StringFinder xcontext, Object application) {
    Object ret = Token.CONTINUE;
        StringKeeper keeper = StringFinderHelper.ensureKeeper(xcontext);
   
    String path = keeper.get(MojasefConstants.REQUEST_LOCALPATH);
    String mountpoint = keeper.get(MojasefConstants.MOUNTPOINT) + keeper.get(MojasefConstants.MOUNTPOINT);

        if (path.startsWith(mountpoint)) {
      path = path.substring(mountpoint.length());
      keeper.put(MojasefConstants.REQUEST_LOCALPATH, path);
    }

        int sep = path.indexOf(DIRSEP);
        keeper.put(MojasefConstants.REQUEST_PATHTAIL,
            sep > 0 ? path.substring(sep+1) : "");

    if (application != null) {
        Object warm = MethodCallUtils.call(application, "warmup", keeper);
        if (warm instanceof Token) return warm;
        if (warm != null) application = warm;
 
        String command = keeper.get(HTTPConstants.REQUEST_METHOD);
        String method = methodName(keeper);
            //keeper.put(MojasefConstants.REQUEST_PATHOBJECT, method);
        String dfl = keeper.get(MojasefConstants.DEFAULT_LEAFNAME);
 
      List<String> methods = new ArrayList<String>();
      if (method != null && method.trim().length() > 0) {
        methods.add(method);
      }
View Full Code Here


    return ret;
  }

 
  public static Token delegate(StringCollector collector, StringFinder context, Object application) {
    StringKeeper keeper = StringFinderHelper.ensureKeeper(context);
    int initial = collector.length();
   
      PrintStream outstream = collector.printStream();
      keeper.put(MojasefConstants.RESPONSE_STREAM, outstream);
      Token token = Token.DONE;
 
        PrintStream oldOutput = null;
      if (captureSysOut) oldOutput = captureSystemOut(outstream, context);
        Object ret = Mojasef.dx(collector, keeper, application);
View Full Code Here

        }
    }
 
  public static Token delegate(StringCollector collector,
      StringFinder context, Object application, Object dfl) {
    StringKeeper keeper = StringFinderHelper.ensureKeeper(context);
   
    Token token = delegate(collector, keeper, application);
    if (token == Token.CONTINUE && dfl != null) {
      token = delegate(collector, keeper, dfl);
    }
View Full Code Here

TOP

Related Classes of org.stringtree.finder.StringKeeper

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.