Class 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.
    • Constructor Detail

      • 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 factory
        namePrefix - - name prefix of the threads created by this factory
    • Method Detail

      • 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