|
Protomatter Classes v1.1.6 | |||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||
See:
Description
| Class Summary | |
| PASWorkServiceImpl | The default implementation of the com.protomatter.pas.service.PASWorkService interface. |
Default implementations for miscellaneous PAS services.
pas.startupClass.WorkQueue =\
com.protomatter.pas.serviceimpl.PASWorkServiceImpl
pas.startupArgs.WorkQueue = q1=10,q2=5,q3=10
This defines a queue named "q1" with 10 work threads, a queue
named "q2" with 5 work threads, and another queue named
"q3" with 10 work threads. To use the queues, do something
like this:
import javax.naming.*; // JNDI stuff
import com.protomatter.pas.service.*; // PASWorkService
...
Context context = get_A_JNDI_Context();
PASWorkService ws
= (PASWorkService)context.lookup(PASWorkService.JNDI_NAME);
ws.addWork(myRunnable); // add work to the default queue.
ws.addWork("q1", myRunnable); // add work to the "q1" queue.
After connecting to the PASWorkService, you can add work (in the form of
any object that implements
the java.lang.Runnable interface) to any of the configured work
queues or to the default queue (see the javadoc for PASWorkService
for available methods). You can also interrogate each of the queues and
find out the queue length, the number of threads currently working and
currently waiting, and the number of threads in general.
|
Protomatter Classes v1.1.6 Copyright 1998-2001 Nate Sammons |
|||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||
| Protomatter Classes v1.1.6 | http://protomatter.sourceforge.net/1.1.6 |