File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Producer/Consumer using SwingWorker

 
Benoit Aumars
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Questions about Thread.
Does anybody can help me regarding Producer/Consumer using SwingWorker ?
Here is the background.
I'm developing a Java program, Swing based, which :
a). check every, say, 30 sec if a file within a directory exists
b). if exists, the process it ( this could be time-consuming task ).
c). run a query every, say, 60 sec ( this could be time-consuming task
).
d). process the result set ( this could be time-consuming task ).
Given that scenario, I think the concept of Producer/Consumer fit.
The Producers are a) and c), and the Consumers are b) and d).
My problem is how implement the SwingWorker for Producer/Consumer ?
Or is there any other approach ( with a sample code ) ?
Any comments would be appreciated.
Thanks,
Benoit.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic