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