Package fr.gouv.vitam.common.thread
Class VitamThreadFactory
- java.lang.Object
-
- fr.gouv.vitam.common.thread.VitamThreadFactory
-
- All Implemented Interfaces:
java.util.concurrent.ThreadFactory
public class VitamThreadFactory extends java.lang.Object implements java.util.concurrent.ThreadFactory
Simple ThreadFactory setting Threads to be Daemon threads (do not prevent shutdown) ; in addition, creates VitamThread allowing us to put session information in those threads.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VitamThreadFactory.VitamThread
Vitam Thread implementation ; mainly used to attach a threadlocal session to it.
-
Constructor Summary
Constructors Constructor Description VitamThreadFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VitamThreadFactory
getInstance()
java.lang.Thread
newThread(java.lang.Runnable arg0)
-
-
-
Method Detail
-
newThread
public java.lang.Thread newThread(java.lang.Runnable arg0)
- Specified by:
newThread
in interfacejava.util.concurrent.ThreadFactory
-
getInstance
public static final VitamThreadFactory getInstance()
- Returns:
- the default
VitamThreadFactory
-
-