001 package railo.runtime.spooler; 002 003 import railo.runtime.exp.PageException; 004 005 public interface SpoolerEngine { 006 007 /** 008 * return the label of the engine 009 * @return the label 010 */ 011 public String getLabel(); 012 013 /** 014 * adds a task to the engine 015 * @param task 016 */ 017 public void add(SpoolerTask task); 018 019 /** 020 * return all open task that are inside the Engine 021 * @return all open tasks 022 */ 023 public SpoolerTask[] getOpenTasks(); //FUTURE remove 024 025 /** 026 * return all closed task that are inside the Engine 027 * @return all closed tasks 028 */ 029 public SpoolerTask[] getClosedTasks(); //FUTURE remove 030 031 /** 032 * remove that task from Spooler 033 * @param task 034 */ 035 public void remove(SpoolerTask task); 036 037 /** 038 * remove a task that match given id 039 * @param id 040 */ 041 public void remove(String id); 042 043 /** 044 * execute task by id and return error throwed by task 045 * @param id 046 * @throws SpoolerException 047 */ 048 public PageException execute(String id); 049 050 /** 051 * execute task and return error throwed by task 052 * @param task 053 * @throws SpoolerException 054 */ 055 public PageException execute(SpoolerTask task); 056 057 058 //public void setLabel(String label); 059 //public void setPersisDirectory(Resource persisDirectory); 060 //public void setLog(Log log); 061 //public void setConfig(Config config); 062 }