|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object au.com.terabit.jproactor.Demultiplexor
public class Demultiplexor
The Demultiplexor
class is the core engine of the JavaProactor.
Demultiplexor acts as IO processor and manages all IO operations requested
by TCPAsynchChannel
class. The IO oprations are proccessed asynchrously by
the pool of threads using leader/follower pattern. Number of processing
thread can be configured by start(int)
operation.
Usually client applications does not require direct access to mutiplexor class, only when multiple protocols would like to reuse the same multiplexor instance.
Each multiplexor instance instantiates one Selector
instance.
$Revision$ $Date$
Field Summary | |
---|---|
static int |
dispatchStategy_
|
static int |
POOL_SIZE
Default Thread Pool size |
static int |
STRATEGY_BALANCE
|
static int |
STRATEGY_FAST
|
Constructor Summary | |
---|---|
Demultiplexor()
Creates multipliexor instance with default pool size. |
Method Summary | |
---|---|
void |
declareInterest(TCPAsynchChannel achannel)
Register m_asynchChannel. |
void |
run()
|
void |
shutdown()
Demultiplexor shutdown. |
void |
start()
Start multiplexor using default thread pool size. |
void |
start(int poolSize)
Start multiplexor. |
void |
startTimer(OpTimer timer)
Schedules timer operation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int POOL_SIZE
public static final int STRATEGY_FAST
public static final int STRATEGY_BALANCE
public static int dispatchStategy_
Constructor Detail |
---|
public Demultiplexor() throws java.io.IOException
java.io.IOException
Method Detail |
---|
public void start(int poolSize)
poolSize
- thread pool sizepublic void start()
POOL_SIZE
public void run()
run
in interface java.lang.Runnable
public void declareInterest(TCPAsynchChannel achannel)
public void shutdown() throws java.lang.InterruptedException
java.lang.InterruptedException
public void startTimer(OpTimer timer)
timer
- operation
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |