|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.d_haven.event.command.DefaultThreadManager
public class DefaultThreadManager
The DefaultThreadManager is a very flexible implementation that should be able to solve just about any need. The ThreadManager portion of code manages the list of registered pipelines while the actual process of making events go through the pipeline is performed by the ThreadPolicy. The DefaultThreadManager will run all the events through all the pipelines in one background thread. If you supply a different ThreadPolicy, it will obey those rules.
| Field Summary | |
|---|---|
private java.util.List |
m_pipelines
|
private ThreadPolicy |
m_policy
|
| Constructor Summary | |
|---|---|
DefaultThreadManager()
Create the DefaultThreadManager using the OneThreadPolicy as the way to run events through the pipelines. |
|
DefaultThreadManager(ThreadPolicy policy)
Create the DefaultThreadManager using the ThreadPolicy of your choice. |
|
| Method Summary | |
|---|---|
java.util.Collection |
getRegisteredPipelines()
Return a copy of all the pipelines registered at this point. |
void |
register(EventPipeline pipeline)
Register an EventPipeline with the ThreadManager. |
void |
stop()
Stop the ThreadManager from running the pipelines. |
java.lang.String |
toString()
|
void |
unregister(EventPipeline pipeline)
Unregister an EventPipeline with the ThreadManager. |
void |
unregisterAll()
Unregisters all EventPipelines from this ThreadManager. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final java.util.List m_pipelines
private final ThreadPolicy m_policy
| Constructor Detail |
|---|
public DefaultThreadManager()
public DefaultThreadManager(ThreadPolicy policy)
policy - the ThreadPolicy to use| Method Detail |
|---|
public java.util.Collection getRegisteredPipelines()
getRegisteredPipelines in interface ThreadManagerpublic void register(EventPipeline pipeline)
register in interface ThreadManagerpipeline - The pipeline to registerpublic void unregister(EventPipeline pipeline)
unregister in interface ThreadManagerpipeline - The pipeline to unregisterpublic void unregisterAll()
unregisterAll in interface ThreadManagerpublic void stop()
stop in interface ThreadManagerpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||