| ||||
| Copyright 1999 Sams Publishing |
| | ||
| | |
| Constructors |
| | |
| Two constructors exist for creating new thread groups. |
| | |
| ThreadGroup(ThreadGroup, String) |
| | |
| public ThreadGroup(ThreadGroup parentGroup, String groupName) |
| throws SecurityException |
| | |
| Creates a new ThreadGroup that is a child group of parentGroup and has the name groupName . The parent groups checkAccess() method is invoked to see if the current thread is allowed to create a new ThreadGroup in parentGroup , which can result in a SecurityException being thrown. If parentGroup is null , a NullPointerException will be thrown. |
| | |
| The new ThreadGroup will have the same maximum thread priority and daemon status as its parent. These can be changed with setMaxPriority() and setDaemon() . See Chapter 10 for more information. |
| | |
| ThreadGroup(String) |
| | |
| public ThreadGroup(String groupName) throws SecurityException |
| | |
| Equivalent to using the main constructor like this: ThreadGroup(Thread.currentThread().getThreadGroup(), groupName). |
| | | ||
| Toc | |||