projects
/
org.ibex.mail.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
51b7502
)
allow more concurrency in script execution
author
adam
<adam@megacz.com>
Thu, 23 Sep 2004 04:35:59 +0000
(
04:35
+0000)
committer
adam
<adam@megacz.com>
Thu, 23 Sep 2004 04:35:59 +0000
(
04:35
+0000)
darcs-hash:
20040923043559
-5007d-
c5dcb180145d2b9691529cdd3f88233d96487f80
.gz
src/org/ibex/mail/target/Script.java
patch
|
blob
|
history
diff --git
a/src/org/ibex/mail/target/Script.java
b/src/org/ibex/mail/target/Script.java
index
d2bca1b
..
27541d7
100644
(file)
--- a/
src/org/ibex/mail/target/Script.java
+++ b/
src/org/ibex/mail/target/Script.java
@@
-24,7
+24,9
@@
public class Script extends Target {
final JS js;
private Message m = null;
final JS js;
private Message m = null;
+ private String filePath = null;
public Script(String filePath) throws JSExn, IOException {
public Script(String filePath) throws JSExn, IOException {
+ this.filePath = filePath;
js = JS.cloneWithNewParentScope(JS.fromReader(filePath, 0, new InputStreamReader(new FileInputStream(filePath))),
new ScriptScope()); }
js = JS.cloneWithNewParentScope(JS.fromReader(filePath, 0, new InputStreamReader(new FileInputStream(filePath))),
new ScriptScope()); }
@@
-38,7
+40,16
@@
public class Script extends Target {
}
}
}
}
- public synchronized void accept(Message m) throws IOException, MailException {
+ public void accept(Message m) throws IOException, MailException {
+ try {
+ new Script(filePath).reallyAccept(m);
+ } catch (JSExn e) {
+ Log.error(this, e);
+ throw new MailException(e.toString());
+ }
+ }
+
+ private synchronized void reallyAccept(Message m) throws IOException, MailException, JSExn {
this.m = m;
try {
Log.info(this, "invoking config...");
this.m = m;
try {
Log.info(this, "invoking config...");