[prev in list] [next in list] [prev in thread] [next in thread]
List: jakarta-commons-dev
Subject: DO NOT REPLY [Bug 32450] -
From: bugzilla () apache ! org
Date: 2005-03-31 18:45:39
Message-ID: 20050331184539.893C028A () ajax ! apache ! org
[Download RAW message or body]
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32450>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=32450
------- Additional Comments From gaxzerow@gmail.com 2005-03-31 20:45 -------
on way to work around this problem is to us a CancellingListener
CancelingListener implements FindListener extends RuntimeException{
boolean cancelled = false;
public void fileFound(FindEvent fe) { check(); }
public void directoryStarted(FindEvent fe) { check(); }
public void directoryFinished(FindEvent fe) { check(); }
private void check() {
if(cancelled)
throw this;
}
public void doCancel(){
cancelled = true;
}
}
and in you find call
---------------------
CancelingListener clistener = new CancelingListener();
try{
finder.addListener(clistener);
find(dir);
}catch(CancelingListener cl){
// find() was cancelled when another thread
// or listener calls clistener.doCancel();
}
---------------------
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic