/** * Create a thread factory which resets all thread-local storage and delegates to the given thread factory. * You must have the {@link RuntimePermission}{@code ("modifyThread")} permission to use this method. * * @param delegate the delegate thread factory * @return the resetting thread factory * @throws SecurityException if the caller does not have the {@link RuntimePermission}{@code ("modifyThread")} * permission */ public static ThreadFactory resettingThreadFactory(final ThreadFactory delegate) throws SecurityException { return wrappingThreadFactory(resettingExecutor(directExecutor()), delegate); }
/** * Create a thread factory which resets all thread-local storage and delegates to the given thread factory. * You must have the {@link RuntimePermission}{@code ("modifyThread")} permission to use this method. * * @param delegate the delegate thread factory * @return the resetting thread factory * @throws SecurityException if the caller does not have the {@link RuntimePermission}{@code ("modifyThread")} * permission */ public static ThreadFactory resettingThreadFactory(final ThreadFactory delegate) throws SecurityException { return wrappingThreadFactory(resettingExecutor(directExecutor()), delegate); }
/** * Create a thread factory which resets all thread-local storage and delegates to the given thread factory. * You must have the {@link RuntimePermission}{@code ("modifyThread")} permission to use this method. * * @param delegate the delegate thread factory * @return the resetting thread factory * @throws SecurityException if the caller does not have the {@link RuntimePermission}{@code ("modifyThread")} * permission */ public static ThreadFactory resettingThreadFactory(final ThreadFactory delegate) throws SecurityException { return wrappingThreadFactory(resettingExecutor(directExecutor()), delegate); }
public static ThreadFactory createThreadFactory(final ThreadGroup threadGroup, final Boolean daemon, final Integer priority, final String namePattern, final Thread.UncaughtExceptionHandler exceptionHandler, final Long stackSize, final List<Object> taskFilterObjects) { return JBossExecutors.wrappingThreadFactory(createTaskFilter(taskFilterObjects), new JBossThreadFactory(threadGroup, daemon, priority, namePattern, exceptionHandler, stackSize)); }