Package com.fazecast.jSerialComm
Class SerialPortThreadFactory
- java.lang.Object
-
- com.fazecast.jSerialComm.SerialPortThreadFactory
-
public class SerialPortThreadFactory extends Object
This class is used to create internal jSerialComm threads. A user can call theset(ThreadFactory)
method to override the way in which threads are created.- See Also:
ThreadFactory
-
-
Constructor Summary
Constructors Constructor Description SerialPortThreadFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ThreadFactory
get()
Returns the currentThreadFactory
instance associated with this library.static void
set(ThreadFactory threadFactory)
Allows a user to define a custom thread factory to be used by this library for creating new threads.
-
-
-
Method Detail
-
get
public static ThreadFactory get()
Returns the currentThreadFactory
instance associated with this library.- Returns:
- The current
ThreadFactory
instance. - See Also:
ThreadFactory
-
set
public static void set(ThreadFactory threadFactory)
Allows a user to define a custom thread factory to be used by this library for creating new threads.Such a custom factory method may be used, for example, to set all new threads to run as daemons.
- Parameters:
threadFactory
- A user-defined custom thread factory instance.- See Also:
ThreadFactory
-
-