org.apache.synapse.util.concurrent
Class SynapseThreadFactory
java.lang.Object
org.apache.synapse.util.concurrent.SynapseThreadFactory
- All Implemented Interfaces:
- ThreadFactory
public class SynapseThreadFactory
- extends Object
- implements ThreadFactory
This is the thread factory for Synapse threads which are accessible through the
SynapseEnvironment as pooled threads.
Method Summary |
Thread |
newThread(Runnable runnable)
This method is the implementation of the the newThread method and will
create new threads under the group and with the nameprefix followed by the
thread number as the id |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SynapseThreadFactory
public SynapseThreadFactory(ThreadGroup group,
String namePrefix)
- Constructor for the ThreadFactory to create new threads
- Parameters:
group
- - all the threads are created under this group by this factorynamePrefix
- - name prefix of the threads created by this factory
newThread
public Thread newThread(Runnable runnable)
- This method is the implementation of the the newThread method and will
create new threads under the group and with the nameprefix followed by the
thread number as the id
- Specified by:
newThread
in interface ThreadFactory
- Parameters:
runnable
- - Runnable class to run by the created thread
- Returns:
- a Thread executing the given runnable
Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.