471 |
|
// Non-public classes supporting the public methods |
472 |
|
|
473 |
|
/** |
474 |
< |
* A callable that runs given task and returns given result |
474 |
> |
* A callable that runs given task and returns given result. |
475 |
|
*/ |
476 |
|
private static final class RunnableAdapter<T> implements Callable<T> { |
477 |
|
private final Runnable task; |
487 |
|
} |
488 |
|
|
489 |
|
/** |
490 |
< |
* A callable that runs under established access control settings |
490 |
> |
* A callable that runs under established access control settings. |
491 |
|
*/ |
492 |
|
private static final class PrivilegedCallable<T> implements Callable<T> { |
493 |
|
final Callable<T> task; |
514 |
|
|
515 |
|
/** |
516 |
|
* A callable that runs under established access control settings and |
517 |
< |
* current ClassLoader |
517 |
> |
* current ClassLoader. |
518 |
|
*/ |
519 |
|
private static final class PrivilegedCallableUsingCurrentClassLoader<T> |
520 |
|
implements Callable<T> { |
565 |
|
} |
566 |
|
|
567 |
|
/** |
568 |
< |
* The default thread factory |
568 |
> |
* The default thread factory. |
569 |
|
*/ |
570 |
|
private static class DefaultThreadFactory implements ThreadFactory { |
571 |
|
private static final AtomicInteger poolNumber = new AtomicInteger(1); |
595 |
|
} |
596 |
|
|
597 |
|
/** |
598 |
< |
* Thread factory capturing access control context and class loader |
598 |
> |
* Thread factory capturing access control context and class loader. |
599 |
|
*/ |
600 |
|
private static class PrivilegedThreadFactory extends DefaultThreadFactory { |
601 |
|
final AccessControlContext acc; |