Class SQSMessagingClientThreadFactory
- java.lang.Object
-
- com.amazon.sqs.javamessaging.util.SQSMessagingClientThreadFactory
-
- All Implemented Interfaces:
ThreadFactory
public class SQSMessagingClientThreadFactory extends Object implements ThreadFactory
Simple thread factory that supports ThreadGroups
-
-
Constructor Summary
Constructors Constructor Description SQSMessagingClientThreadFactory(String taskName, boolean isDaemon)
SQSMessagingClientThreadFactory(String taskName, boolean isDaemon, boolean createWithThreadGroup)
SQSMessagingClientThreadFactory(String taskName, ThreadGroup threadGroup)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Thread
newThread(Runnable r)
Constructs a new Thread.boolean
wasThreadCreatedWithThisThreadGroup(Thread thread)
Checks if the thread is member of the thread group
-
-
-
Constructor Detail
-
SQSMessagingClientThreadFactory
public SQSMessagingClientThreadFactory(String taskName, boolean isDaemon)
-
SQSMessagingClientThreadFactory
public SQSMessagingClientThreadFactory(String taskName, boolean isDaemon, boolean createWithThreadGroup)
-
SQSMessagingClientThreadFactory
public SQSMessagingClientThreadFactory(String taskName, ThreadGroup threadGroup)
-
-
Method Detail
-
newThread
public Thread newThread(Runnable r)
Constructs a new Thread. Initializes name, daemon status, and ThreadGroup if there is any.- Specified by:
newThread
in interfaceThreadFactory
- Parameters:
r
- A runnable to be executed by new thread instance- Returns:
- The constructed thread
-
wasThreadCreatedWithThisThreadGroup
public boolean wasThreadCreatedWithThisThreadGroup(Thread thread)
Checks if the thread is member of the thread group- Parameters:
thread
-- Returns:
- True If there is a thread group and the given thread is member of the group
-
-