Package org.serviceconnector.util
Class NamedPriorityThreadFactory
java.lang.Object
org.serviceconnector.util.NamedPriorityThreadFactory
- All Implemented Interfaces:
ThreadFactory
A
ThreadFactory that sets names and priority to the threads created by this factory. Threads created by this factory will take names in the form of the string
namePrefix + " thread-" + threadNum where threadNum is the count of threads created by this type of factory.-
Constructor Summary
ConstructorsConstructorDescriptionNamedPriorityThreadFactory(String namePrefix) Constructor accepting the prefix of the threads that will be created by thisThreadFactoryNamedPriorityThreadFactory(String namePrefix, int threadPrio) Constructor accepting the prefix and priority of the threads that will be created by thisThreadFactory -
Method Summary
-
Constructor Details
-
NamedPriorityThreadFactory
Constructor accepting the prefix and priority of the threads that will be created by thisThreadFactory- Parameters:
namePrefix- Prefix for names of threads
-
NamedPriorityThreadFactory
Constructor accepting the prefix of the threads that will be created by thisThreadFactory- Parameters:
namePrefix- the name prefix
-
-
Method Details
-
newThread
Returns a new thread using a name and priority as specified by this factory- Specified by:
newThreadin interfaceThreadFactory
-