QueueFactory

Jean Morissette <[email protected]> Mon, 22 Nov 2004 20:52:21 -0500
Newsgroups gmane.comp.java.seda.user
Message-ID <[email protected]>
Hi,
One of my goal is to support differents kinds of Queue.  To achieve 
that, we must determine who is responsible to create a Queue. 
Presently, FiniteQueue is the only queue implementation that we have and 
it is created by the concrete StageWrapper.

Instead, I suggest that the TM have the Queue creation responsability:

public interface ThreadManagerIF {
   Queue createQueue();
   ...
}

One reason is that the TM is the only one to use 
SourceIF/BlockingSourceIF operations.  Thus, one TM could use SourceIF 
and another BlockingSourceIF.

Another possibility could be to add a method StageWrapperIF.setQueue. 
This new method would be called by TM just after that StageWrapperIF has 
called TM.register.

Jean



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/