< prev index next >

src/java.rmi/share/classes/sun/rmi/runtime/NewThreadAction.java

Print this page

 52 
 53     /** cached reference to the system (root) thread group */
 54     @SuppressWarnings("removal")
 55     static final ThreadGroup systemThreadGroup =
 56         AccessController.doPrivileged(new PrivilegedAction<ThreadGroup>() {
 57             public ThreadGroup run() {
 58                 ThreadGroup group = Thread.currentThread().getThreadGroup();
 59                 ThreadGroup parent;
 60                 while ((parent = group.getParent()) != null) {
 61                     group = parent;
 62                 }
 63                 return group;
 64             }
 65         });
 66 
 67     /**
 68      * special child of the system thread group for running tasks that
 69      * may execute user code, so that the security policy for threads in
 70      * the system thread group will not apply
 71      */
 72     @SuppressWarnings("removal")
 73     static final ThreadGroup userThreadGroup =
 74         AccessController.doPrivileged(new PrivilegedAction<ThreadGroup>() {
 75             public ThreadGroup run() {
 76                 return new ThreadGroup(systemThreadGroup, "RMI Runtime");
 77             }
 78         });
 79 
 80     private final ThreadGroup group;
 81     private final Runnable runnable;
 82     private final String name;
 83     private final boolean daemon;
 84 
 85     NewThreadAction(ThreadGroup group, Runnable runnable,
 86                     String name, boolean daemon)
 87     {
 88         this.group = group;
 89         this.runnable = runnable;
 90         this.name = name;
 91         this.daemon = daemon;
 92     }

 52 
 53     /** cached reference to the system (root) thread group */
 54     @SuppressWarnings("removal")
 55     static final ThreadGroup systemThreadGroup =
 56         AccessController.doPrivileged(new PrivilegedAction<ThreadGroup>() {
 57             public ThreadGroup run() {
 58                 ThreadGroup group = Thread.currentThread().getThreadGroup();
 59                 ThreadGroup parent;
 60                 while ((parent = group.getParent()) != null) {
 61                     group = parent;
 62                 }
 63                 return group;
 64             }
 65         });
 66 
 67     /**
 68      * special child of the system thread group for running tasks that
 69      * may execute user code, so that the security policy for threads in
 70      * the system thread group will not apply
 71      */
 72     @SuppressWarnings({"deprecation", "removal"})
 73     static final ThreadGroup userThreadGroup =
 74         AccessController.doPrivileged(new PrivilegedAction<ThreadGroup>() {
 75             public ThreadGroup run() {
 76                 return new ThreadGroup(systemThreadGroup, "RMI Runtime");
 77             }
 78         });
 79 
 80     private final ThreadGroup group;
 81     private final Runnable runnable;
 82     private final String name;
 83     private final boolean daemon;
 84 
 85     NewThreadAction(ThreadGroup group, Runnable runnable,
 86                     String name, boolean daemon)
 87     {
 88         this.group = group;
 89         this.runnable = runnable;
 90         this.name = name;
 91         this.daemon = daemon;
 92     }
< prev index next >