Package org.openhab.core.common
Class NamedThreadFactory
java.lang.Object
org.openhab.core.common.NamedThreadFactory
- All Implemented Interfaces:
ThreadFactory
Thread factory that applies a thread name constructed by a supplied identifier.
The thread name will look similar to: OH-id-counter The value of "id" will be replaced with the given ID. The value of "counter" will start from one and increased for every newly created thread.
- Author:
- Markus Rathgeb - Initial contribution
-
Constructor Summary
ConstructorDescriptionCreates a new named thread factory.NamedThreadFactory
(String id, boolean daemonize) Creates a new named thread factory.NamedThreadFactory
(String id, boolean daemonize, int priority) Creates a new named thread factory. -
Method Summary
-
Constructor Details
-
NamedThreadFactory
Creates a new named thread factory.This constructor will create a new named thread factory using the following parameters:
- daemonize: false
- priority: normale
- Parameters:
id
- the identifier used for the thread name creation
-
NamedThreadFactory
Creates a new named thread factory.This constructor will create a new named thread factory using the following parameters:
- daemonize: false
- Parameters:
id
- the identifier used for the thread name creationdaemonize
- flag if the created thread should be daemonized
-
NamedThreadFactory
Creates a new named thread factory.- Parameters:
id
- the identifier used for the thread name creationdaemonize
- flag if the created threads should be daemonizedpriority
- the priority of the created threads
-
-
Method Details
-
newThread
- Specified by:
newThread
in interfaceThreadFactory
-