org.d_haven.event.command

Interface ThreadManager

public interface ThreadManager

A ThreadManager handles the thread policies for EventPipelines. It works hand in hand with the DefaultCommandManager, and can be expanded to work with a SEDA like architecture.

Author: Berin Loritsch

Method Summary
CollectiongetRegisteredPipelines()
Get the collection of registered pipelines.
voidregister(EventPipeline pipeline)
Register an EventPipeline with the ThreadManager.
voidstop()
Stop managing the pipelines, and shut down all threads in use.
voidunregister(EventPipeline pipeline)
Deregister an EventPipeline with the ThreadManager.
voidunregisterAll()
Deregisters all EventPipelines from this ThreadManager.

Method Detail

getRegisteredPipelines

public Collection getRegisteredPipelines()
Get the collection of registered pipelines.

Returns: the collection

register

public void register(EventPipeline pipeline)
Register an EventPipeline with the ThreadManager.

Parameters: pipeline The pipeline to register

stop

public void stop()
Stop managing the pipelines, and shut down all threads in use.

unregister

public void unregister(EventPipeline pipeline)
Deregister an EventPipeline with the ThreadManager.

Parameters: pipeline The pipeline to unregister

unregisterAll

public void unregisterAll()
Deregisters all EventPipelines from this ThreadManager.