- All Implemented Interfaces:
Thread.UncaughtExceptionHandler
An implementation of
ThreadGroup
that allows to configure the behaviour of
uncaughtException(Thread, Throwable).
This class is not final, to allow further modifications.
- Author:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: ThreadGroupExt.java 1118 2024-03-15 16:14:15Z tquadrat $
- Since:
- 0.1.0
- UML Diagram
-
UML Diagram for "org.tquadrat.foundation.lang.ThreadGroupExt"
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Thread.UncaughtExceptionHandlerTheThread.UncaughtExceptionHandlerfor this thread group. -
Constructor Summary
ConstructorsConstructorDescriptionThreadGroupExt(String name) Constructs a new thread group.ThreadGroupExt(String name, Thread.UncaughtExceptionHandler handler) Constructs a new thread group.ThreadGroupExt(ThreadGroup parent, String name) Constructs a new thread group.ThreadGroupExt(ThreadGroup parent, String name, Thread.UncaughtExceptionHandler handler) Constructs a new thread group. -
Method Summary
Methods inherited from class java.lang.ThreadGroup
activeCount, activeGroupCount, checkAccess, destroy, enumerate, enumerate, enumerate, enumerate, getMaxPriority, getName, getParent, interrupt, isDaemon, isDestroyed, list, parentOf, resume, setDaemon, setMaxPriority, stop, suspend, toString
-
Field Details
-
m_UncaughtExceptionHandler
TheThread.UncaughtExceptionHandlerfor this thread group. It can benull.
-
-
Constructor Details
-
ThreadGroupExt
Constructs a new thread group.
The parent of this new group is the thread group of the currently running thread.
The behaviour of
uncaughtException(Thread, Throwable)is that of the superclass.- Parameters:
name- The name of the new thread group.- Throws:
IllegalArgumentException- Thenameargument is eithernull, empty or blank.SecurityException- The current thread cannot create a thread in this thread group.
-
ThreadGroupExt
Constructs a new thread group.
The parent of this new group is the specified thread group.
The behaviour of
uncaughtException(Thread, Throwable)is that of the superclass.- Parameters:
parent- The parent thread group.name- The name of the new thread group.- Throws:
IllegalArgumentException- Thenameargument is eithernull, empty or blank, or theparentthread group argument isnull.SecurityException- The current thread cannot create a thread in this thread group.
-
ThreadGroupExt
public ThreadGroupExt(String name, Thread.UncaughtExceptionHandler handler) throws IllegalArgumentException Constructs a new thread group.
The parent of this new group is the thread group of the currently running thread.
The behaviour of
uncaughtException(Thread, Throwable)is determined by the provided handler.- Parameters:
name- The name of the new thread group.handler- The handler for the uncaught exceptions.- Throws:
IllegalArgumentException- Thenameargument is eithernull, empty or blank, or thehandlerargument isnull.SecurityException- The current thread cannot create a thread in this thread group.
-
ThreadGroupExt
public ThreadGroupExt(ThreadGroup parent, String name, Thread.UncaughtExceptionHandler handler) throws IllegalArgumentException Constructs a new thread group.
The parent of this new group is the specified thread group.
The behaviour of
uncaughtException(Thread, Throwable)is determined by the provided handler.- Parameters:
parent- The parent thread group.name- The name of the new thread group.handler- The handler for the uncaught exceptions.- Throws:
IllegalArgumentException- Thenameargument is eithernull, empty or blank, or one of theparentthread group or thehandlerarguments isnull.SecurityException- The current thread cannot create a thread in this thread group.
-
-
Method Details
-
uncaughtException
- Specified by:
uncaughtExceptionin interfaceThread.UncaughtExceptionHandler- Overrides:
uncaughtExceptionin classThreadGroup
-
