001    package railo.runtime.thread;
002    
003    import railo.runtime.config.Config;
004    import railo.runtime.exp.PageException;
005    import railo.runtime.spooler.ExecutionPlan;
006    import railo.runtime.spooler.SpoolerTaskSupport;
007    import railo.runtime.type.Struct;
008    import railo.runtime.type.StructImpl;
009    
010    public class ChildSpoolerTask extends SpoolerTaskSupport {
011    
012            private ChildThreadImpl ct;
013    
014            public ChildSpoolerTask(ChildThreadImpl ct,ExecutionPlan[] plans) {
015                    super(plans);
016                    this.ct=ct;
017            }
018    
019            /**
020             * @see railo.runtime.spooler.SpoolerTask#detail()
021             */
022            public Struct detail() {
023                    StructImpl detail = new StructImpl();
024                    detail.setEL("template", ct.getTemplate());
025                    return detail;
026            }
027    
028            public Object execute(Config config) throws PageException {
029                    PageException pe = ct.execute(config);
030                    if(pe!=null) throw pe;
031                    return null;
032            }
033    
034            public String getType() {
035                    return "cfthread";
036            }
037    
038            public String subject() {
039                    return ct.getTagName();
040            }
041    
042    }