Package org.nutz.mvc

Examples of org.nutz.mvc.Processor


  public NutActionChain(List<Processor> list, Processor errorProcessor) {
    if (null != list) {
      Iterator<Processor> it = list.iterator();
      if (it.hasNext()) {
        head = it.next();
        Processor p = head;
        while (it.hasNext()) {
          Processor next = it.next();
          p.setNext(next);
          p = next;
        }
      }
    }
View Full Code Here


  public ActionChain eval(NutConfig config, ActionInfo ai) {
   
    try {
      List<Processor> list = new ArrayList<Processor>();
      for (String name : co.getProcessors(ai.getChainName())) {
        Processor processor = getProcessorByName(config, name);
        processor.init(config, ai);
        list.add(processor);
      }

      Processor errorProcessor = getProcessorByName(config, co.getErrorProcessor(ai.getChainName()));
      errorProcessor.init(config, ai);
      /*
       * 返回动作链实例
       */
      ActionChain chain = new NutActionChain(list, errorProcessor);
      return chain;
View Full Code Here

    public NutActionChain(List<Processor> list, Processor errorProcessor, Method method) {
        if (null != list) {
            Iterator<Processor> it = list.iterator();
            if (it.hasNext()) {
                head = it.next();
                Processor p = head;
                while (it.hasNext()) {
                    Processor next = it.next();
                    p.setNext(next);
                    p = next;
                }
            }
        }
View Full Code Here

    public ActionChain eval(NutConfig config, ActionInfo ai) {
       
        try {
            List<Processor> list = new ArrayList<Processor>();
            for (String name : co.getProcessors(ai.getChainName())) {
                Processor processor = getProcessorByName(config, name);
                processor.init(config, ai);
                list.add(processor);
            }

            Processor errorProcessor = getProcessorByName(config, co.getErrorProcessor(ai.getChainName()));
            errorProcessor.init(config, ai);
            /*
             * 返回动作链实例
             */
            ActionChain chain = new NutActionChain(list, errorProcessor, ai.getMethod());
            return chain;
View Full Code Here

    protected static <T> T evalObj(NutConfig config, ObjectInfo<T> info) {
        return null == info ? null : Loadings.evalObj(config, info.getType(), info.getArgs());
    }

    protected void renderView(ActionContext ac) throws Throwable {
        Processor p = next;
        while (p != null) {
            if (p instanceof ViewProcessor) {
                p.process(ac);
                return;
            }
            p = p.getNext();
        }
    }
View Full Code Here

TOP

Related Classes of org.nutz.mvc.Processor

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.