332 |
|
* be the same as the thread invoking this |
333 |
|
* {@code privilegedThreadFactory} method. A new |
334 |
|
* {@code privilegedThreadFactory} can be created within an |
335 |
< |
* {@link AccessController#doPrivileged} action setting the |
336 |
< |
* current thread's access control context to create threads with |
337 |
< |
* the selected permission settings holding within that action. |
335 |
> |
* {@link AccessController#doPrivileged AccessController.doPrivileged} |
336 |
> |
* action setting the current thread's access control context to |
337 |
> |
* create threads with the selected permission settings holding |
338 |
> |
* within that action. |
339 |
|
* |
340 |
|
* <p>Note that while tasks running within such threads will have |
341 |
|
* the same access control and class loader settings as the |
419 |
|
} |
420 |
|
|
421 |
|
/** |
422 |
< |
* Returns a {@link Callable} object that will, when |
423 |
< |
* called, execute the given {@code callable} under the current |
424 |
< |
* access control context. This method should normally be |
425 |
< |
* invoked within an {@link AccessController#doPrivileged} action |
426 |
< |
* to create callables that will, if possible, execute under the |
427 |
< |
* selected permission settings holding within that action; or if |
428 |
< |
* not possible, throw an associated {@link |
422 |
> |
* Returns a {@link Callable} object that will, when called, |
423 |
> |
* execute the given {@code callable} under the current access |
424 |
> |
* control context. This method should normally be invoked within |
425 |
> |
* an {@link AccessController#doPrivileged AccessController.doPrivileged} |
426 |
> |
* action to create callables that will, if possible, execute |
427 |
> |
* under the selected permission settings holding within that |
428 |
> |
* action; or if not possible, throw an associated {@link |
429 |
|
* AccessControlException}. |
430 |
|
* @param callable the underlying task |
431 |
|
* @return a callable object |
438 |
|
} |
439 |
|
|
440 |
|
/** |
441 |
< |
* Returns a {@link Callable} object that will, when |
442 |
< |
* called, execute the given {@code callable} under the current |
443 |
< |
* access control context, with the current context class loader |
444 |
< |
* as the context class loader. This method should normally be |
445 |
< |
* invoked within an {@link AccessController#doPrivileged} action |
446 |
< |
* to create callables that will, if possible, execute under the |
447 |
< |
* selected permission settings holding within that action; or if |
448 |
< |
* not possible, throw an associated {@link |
441 |
> |
* Returns a {@link Callable} object that will, when called, |
442 |
> |
* execute the given {@code callable} under the current access |
443 |
> |
* control context, with the current context class loader as the |
444 |
> |
* context class loader. This method should normally be invoked |
445 |
> |
* within an |
446 |
> |
* {@link AccessController#doPrivileged AccessController.doPrivileged} |
447 |
> |
* action to create callables that will, if possible, execute |
448 |
> |
* under the selected permission settings holding within that |
449 |
> |
* action; or if not possible, throw an associated {@link |
450 |
|
* AccessControlException}. |
449 |
– |
* @param callable the underlying task |
451 |
|
* |
452 |
+ |
* @param callable the underlying task |
453 |
|
* @return a callable object |
454 |
|
* @throws NullPointerException if callable null |
455 |
|
* @throws AccessControlException if the current access control |