diff --git a/build/lib/dist/servlet.jar b/build/lib/dist/servlet.jar
new file mode 100644
index 0000000..8f1a2c9
--- /dev/null
+++ b/build/lib/dist/servlet.jar
Binary files differ
diff --git a/build/lib/jetty-util.jar b/build/lib/jetty-util.jar
deleted file mode 100644
index f1b2e29..0000000
--- a/build/lib/jetty-util.jar
+++ /dev/null
Binary files differ
diff --git a/build/lib/jetty.jar b/build/lib/jetty.jar
deleted file mode 100644
index 29f077d..0000000
--- a/build/lib/jetty.jar
+++ /dev/null
Binary files differ
diff --git a/build/lib/merge/commons-lang.jar b/build/lib/merge/commons-lang.jar
new file mode 100644
index 0000000..c33b353
--- /dev/null
+++ b/build/lib/merge/commons-lang.jar
Binary files differ
diff --git a/build/lib/merge/jetty-sslengine.jar b/build/lib/merge/jetty-sslengine.jar
new file mode 100644
index 0000000..5921be2
--- /dev/null
+++ b/build/lib/merge/jetty-sslengine.jar
Binary files differ
diff --git a/build/lib/merge/jetty-util.jar b/build/lib/merge/jetty-util.jar
new file mode 100644
index 0000000..9b9c703
--- /dev/null
+++ b/build/lib/merge/jetty-util.jar
Binary files differ
diff --git a/build/lib/merge/jetty.jar b/build/lib/merge/jetty.jar
new file mode 100644
index 0000000..66c1ac1
--- /dev/null
+++ b/build/lib/merge/jetty.jar
Binary files differ
diff --git a/build/lib/servlet-api.jar b/build/lib/servlet-api.jar
deleted file mode 100644
index a604b6f..0000000
--- a/build/lib/servlet-api.jar
+++ /dev/null
Binary files differ
diff --git a/build/lib/versions.txt b/build/lib/versions.txt
index 944a7e7..03c7f8f 100644
--- a/build/lib/versions.txt
+++ b/build/lib/versions.txt
@@ -5,10 +5,12 @@
ant-subdirtask.jar | Revision 1.4 (CVS)
bouncycastle.jar | JDK 1.5, 138 (bcprov-jdk15-138.jar)
commons-el.jar | Jetty 5.1.10
+commons-lang.jar | 2.3
dom4j.jar | 1.6.1
!jaxen.jar | 1.1 beta 4 (from DOM4J 1.6.1)
-jetty.jar | 6.0.1
-jetty-util.jar | 6.0.1
+jetty.jar | Jetty 6.1.7
+jetty-sslengine.jar | Jetty 6.1.7
+jetty-util.jar | Jetty 6.1.7
junit.jar | 3.8.1
jdic.jar | 0.9.1 (for windows only)
jzlib.jar | 1.0.7
@@ -16,6 +18,6 @@
mina-filter-compression.jar | 1.1.6 (https://svn.apache.org/repos/asf/mina/branches/1.1)
mina-filter-ssl.jar | 1.1.6 (https://svn.apache.org/repos/asf/mina/branches/1.1)
pack200task.jar | August 5, 2004
-servlet-api.jar | 2.5-6.0.1
+servlet.jar | Jetty 6.1.7 (2.5)
xmltask.jar | 1.11
xpp3.jar | XPP_3 1.1.4c
\ No newline at end of file
diff --git a/src/conf/manager.xml b/src/conf/manager.xml
index 5c7c397..48041cb 100644
--- a/src/conf/manager.xml
+++ b/src/conf/manager.xml
@@ -101,8 +101,29 @@
Reads a Document from the given stream
+ * + * @param charSet the charSet that the input is encoded in + * @param inInputStream
to read from.
+ * @return the newly created Document instance
+ * @throws DocumentException if an error occurs during parsing.
+ */
+ public Document read(String charSet, InputStream in)
+ throws DocumentException, IOException, XmlPullParserException
+ {
+ return read(createReader(in, charSet));
+ }
+
+ /**
* Reads a Document from the given Reader
In fixed-delay execution, each execution is scheduled relative to + * the actual execution time of the previous execution. If an execution + * is delayed for any reason (such as garbage collection or other + * background activity), subsequent executions will be delayed as well. + * In the long run, the frequency of execution will generally be slightly + * lower than the reciprocal of the specified period (assuming the system + * clock underlying Object.wait(long) is accurate). + * + *
Fixed-delay execution is appropriate for recurring activities + * that require "smoothness." In other words, it is appropriate for + * activities where it is more important to keep the frequency accurate + * in the short run than in the long run. This includes most animation + * tasks, such as blinking a cursor at regular intervals. It also includes + * tasks wherein regular activity is performed in response to human + * input, such as automatically repeating a character as long as a key + * is held down. + * + * @param task task to be scheduled. + * @param delay delay in milliseconds before task is to be executed. + * @param period time in milliseconds between successive task executions. + * @throws IllegalArgumentException if delay is negative, or + * delay + System.currentTimeMillis() is negative. + * @throws IllegalStateException if task was already scheduled or + * cancelled, timer was cancelled, or timer thread terminated. + */ + public void schedule(TimerTask task, long delay, long period) { + TimerTaskWrapper taskWrapper = new TimerTaskWrapper(task); + wrappedTasks.put(task, taskWrapper); + timer.schedule(taskWrapper, delay, period); + } + + /** + * Schedules the specified task for repeated fixed-delay execution, + * beginning at the specified time. Subsequent executions take place at + * approximately regular intervals, separated by the specified period. + * + *
In fixed-delay execution, each execution is scheduled relative to + * the actual execution time of the previous execution. If an execution + * is delayed for any reason (such as garbage collection or other + * background activity), subsequent executions will be delayed as well. + * In the long run, the frequency of execution will generally be slightly + * lower than the reciprocal of the specified period (assuming the system + * clock underlying Object.wait(long) is accurate). + * + *
Fixed-delay execution is appropriate for recurring activities + * that require "smoothness." In other words, it is appropriate for + * activities where it is more important to keep the frequency accurate + * in the short run than in the long run. This includes most animation + * tasks, such as blinking a cursor at regular intervals. It also includes + * tasks wherein regular activity is performed in response to human + * input, such as automatically repeating a character as long as a key + * is held down. + * + * @param task task to be scheduled. + * @param firstTime First time at which task is to be executed. + * @param period time in milliseconds between successive task executions. + * @throws IllegalArgumentException if time.getTime() is negative. + * @throws IllegalStateException if task was already scheduled or + * cancelled, timer was cancelled, or timer thread terminated. + */ + public void schedule(TimerTask task, Date firstTime, long period) { + TimerTaskWrapper taskWrapper = new TimerTaskWrapper(task); + wrappedTasks.put(task, taskWrapper); + timer.schedule(taskWrapper, firstTime, period); + } + + /** + * Schedules the specified task for repeated fixed-rate execution, + * beginning after the specified delay. Subsequent executions take place + * at approximately regular intervals, separated by the specified period. + * + *
In fixed-rate execution, each execution is scheduled relative to the + * scheduled execution time of the initial execution. If an execution is + * delayed for any reason (such as garbage collection or other background + * activity), two or more executions will occur in rapid succession to + * "catch up." In the long run, the frequency of execution will be + * exactly the reciprocal of the specified period (assuming the system + * clock underlying Object.wait(long) is accurate). + * + *
Fixed-rate execution is appropriate for recurring activities that + * are sensitive to absolute time, such as ringing a chime every + * hour on the hour, or running scheduled maintenance every day at a + * particular time. It is also appropriate for recurring activities + * where the total time to perform a fixed number of executions is + * important, such as a countdown timer that ticks once every second for + * ten seconds. Finally, fixed-rate execution is appropriate for + * scheduling multiple repeating timer tasks that must remain synchronized + * with respect to one another. + * + * @param task task to be scheduled. + * @param delay delay in milliseconds before task is to be executed. + * @param period time in milliseconds between successive task executions. + * @throws IllegalArgumentException if delay is negative, or + * delay + System.currentTimeMillis() is negative. + * @throws IllegalStateException if task was already scheduled or + * cancelled, timer was cancelled, or timer thread terminated. + */ + public void scheduleAtFixedRate(TimerTask task, long delay, long period) { + TimerTaskWrapper taskWrapper = new TimerTaskWrapper(task); + wrappedTasks.put(task, taskWrapper); + timer.scheduleAtFixedRate(taskWrapper, delay, period); + } + + /** + * Schedules the specified task for repeated fixed-rate execution, + * beginning at the specified time. Subsequent executions take place at + * approximately regular intervals, separated by the specified period. + * + *
In fixed-rate execution, each execution is scheduled relative to the + * scheduled execution time of the initial execution. If an execution is + * delayed for any reason (such as garbage collection or other background + * activity), two or more executions will occur in rapid succession to + * "catch up." In the long run, the frequency of execution will be + * exactly the reciprocal of the specified period (assuming the system + * clock underlying Object.wait(long) is accurate). + * + *
Fixed-rate execution is appropriate for recurring activities that + * are sensitive to absolute time, such as ringing a chime every + * hour on the hour, or running scheduled maintenance every day at a + * particular time. It is also appropriate for recurring activities + * where the total time to perform a fixed number of executions is + * important, such as a countdown timer that ticks once every second for + * ten seconds. Finally, fixed-rate execution is appropriate for + * scheduling multiple repeating timer tasks that must remain synchronized + * with respect to one another. + * + * @param task task to be scheduled. + * @param firstTime First time at which task is to be executed. + * @param period time in milliseconds between successive task executions. + * @throws IllegalArgumentException if time.getTime() is negative. + * @throws IllegalStateException if task was already scheduled or + * cancelled, timer was cancelled, or timer thread terminated. + */ + public void scheduleAtFixedRate(TimerTask task, Date firstTime, long period) { + TimerTaskWrapper taskWrapper = new TimerTaskWrapper(task); + wrappedTasks.put(task, taskWrapper); + timer.scheduleAtFixedRate(taskWrapper, firstTime, period); + } + + /** + * Cancels the execution of a scheduled task. {@link java.util.TimerTask#cancel()} + * + * @param task the scheduled task to cancel. + */ + public void cancelScheduledTask(TimerTask task) { + TaskEngine.TimerTaskWrapper taskWrapper = wrappedTasks.remove(task); + if (taskWrapper != null) { + taskWrapper.cancel(); + } + } + + /** + * Shuts down the task engine service. + */ + public void shutdown() { + if (executor != null) { + executor.shutdownNow(); + executor = null; + } + + if (timer != null) { + timer.cancel(); + timer = null; + } + } + + /** + * Wrapper class for a standard TimerTask. It simply executes the TimerTask + * using the executor's thread pool. + */ + private class TimerTaskWrapper extends TimerTask { + + private TimerTask task; + + public TimerTaskWrapper(TimerTask task) { + this.task = task; + } + + public void run() { + executor.submit(task); + } + } +} \ No newline at end of file