| Modifier and Type | Field and Description |
|---|---|
| private static final ThreadLocal | IS_INTERNAL_THREAD
Marks framework-internal threads. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static <T> T | |
| public static <T> T | |
| public static <T> T | createDefaultInstance(Iterable<? extends ClassLoader> cls, Class<? extends T> targetType, String className)
|
| public static boolean | Returns: true if the thread is considered internal to the framework; false if notTells whether the calling thread is an Apache MINA sshd framework-internal thread. |
| public static Iterator | |
| public static CloseableExecutorService | |
| public static CloseableExecutorService | |
| public static CloseableExecutorService | |
| public static CloseableExecutorService | |
| public static CloseableExecutorService | |
| public static ScheduledExecutorService | |
| public static CloseableExecutorService | |
| public static CloseableExecutorService | Returns: Either the original service or a wrapped one - depending on the value of the shutdownOnExit parameterThe original service - ignored if executorService, boolean nullIf shutdownOnExit)true then it is OK to shutdown the executor so no wrapping takes place.Wraps an |
| public static Class | |
| public static Class | |
| public static ClassLoader | |
| public static ClassLoader | Returns: The resolvedClassLoader - Note: might still be null if went all the way
"down" to the system class loader and it was also null.The anchor anchor)Class to use if no current thread context class loader - ignored if
nullAttempts to find the most suitable
|
| public static Iterable | |
| public static Iterable | |
| public static < return type V> V | Returns: the result ofcodecode to run code)Runs a piece of code given as a |
| public static < parameter type T, return type V> V | Returns: the result ofcodeparameter for the function param, IOFunction<? super T, V> function to run code)Runs an |
| IS_INTERNAL_THREAD | back to summary |
|---|---|
| private static final ThreadLocal<Boolean> IS_INTERNAL_THREAD Marks framework-internal threads. | |
| ThreadUtils | back to summary |
|---|---|
| private ThreadUtils() | |
| createDefaultInstance | back to summary |
|---|---|
| public static <T> T createDefaultInstance(Class<?> anchor, Class<? extends T> targetType, String className) throws ReflectiveOperationException | |
| createDefaultInstance | back to summary |
|---|---|
| public static <T> T createDefaultInstance(ClassLoader cl, Class<? extends T> targetType, String className) throws ReflectiveOperationException | |
| createDefaultInstance | back to summary |
|---|---|
| public static <T> T createDefaultInstance(Iterable<? extends ClassLoader> cls, Class<? extends T> targetType, String className) throws ReflectiveOperationException | |
| isInternalThread | back to summary |
|---|---|
| public static boolean isInternalThread() Tells whether the calling thread is an Apache MINA sshd framework-internal thread.
| |
| iterateDefaultClassLoaders | back to summary |
|---|---|
| public static Iterator | |
| newCachedThreadPool | back to summary |
|---|---|
| public static CloseableExecutorService newCachedThreadPool(String poolName) | |
| newCachedThreadPoolIf | back to summary |
|---|---|
| public static CloseableExecutorService newCachedThreadPoolIf(CloseableExecutorService executorService, String poolName) | |
| newFixedThreadPool | back to summary |
|---|---|
| public static CloseableExecutorService newFixedThreadPool(String poolName, int nThreads) | |
| newFixedThreadPoolIf | back to summary |
|---|---|
| public static CloseableExecutorService newFixedThreadPoolIf(CloseableExecutorService executorService, String poolName, int nThreads) | |
| newSingleThreadExecutor | back to summary |
|---|---|
| public static CloseableExecutorService newSingleThreadExecutor(String poolName) | |
| newSingleThreadScheduledExecutor | back to summary |
|---|---|
| public static ScheduledExecutorService newSingleThreadScheduledExecutor(String poolName) | |
| noClose | back to summary |
|---|---|
| public static CloseableExecutorService noClose(CloseableExecutorService executorService) | |
| protectExecutorServiceShutdown | back to summary |
|---|---|
| public static CloseableExecutorService protectExecutorServiceShutdown(CloseableExecutorService executorService, boolean shutdownOnExit) Wraps an Note the exposed wrapped proxy will answer correctly the
| |
| resolveDefaultClass | back to summary |
|---|---|
| public static Class | |
| resolveDefaultClass | back to summary |
|---|---|
| public static Class | |
| resolveDefaultClassLoader | back to summary |
|---|---|
| public static ClassLoader resolveDefaultClassLoader(Object anchor) | |
| resolveDefaultClassLoader | back to summary |
|---|---|
| public static ClassLoader resolveDefaultClassLoader(Class<?> anchor) Attempts to find the most suitable
| |
| resolveDefaultClassLoaders | back to summary |
|---|---|
| public static Iterable | |
| resolveDefaultClassLoaders | back to summary |
|---|---|
| public static Iterable | |
| runAsInternal | back to summary |
|---|---|
| public static <V> V runAsInternal(Callable<V> code) throws Exception Runs a piece of code given as a
| |
| runAsInternal | back to summary |
|---|---|
| public static <T, V> V runAsInternal(T param, IOFunction<? super T, V> code) throws IOException Runs an
| |