Class ManagedThreadFactoryImpl

  • All Implemented Interfaces:
    jakarta.enterprise.concurrent.ManagedThreadFactory, ForkJoinPool.ForkJoinWorkerThreadFactory, ThreadFactory

    public class ManagedThreadFactoryImpl
    extends org.glassfish.enterprise.concurrent.ManagedThreadFactoryImpl
    ManagedThreadFactory implementation ensuring SecurityIdentity propagation into new threads.
    Author:
    Jan Kalina, emmartins
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      class  ManagedThreadFactoryImpl.ManagedThread
      Managed thread extension, to allow canceling the task running in the thread.
    • Field Summary

      • Fields inherited from class org.glassfish.enterprise.concurrent.ManagedThreadFactoryImpl

        MANAGED_THREAD_FACTORY_STOPPED, savedContextHandleForSetup
    • Constructor Summary

      Constructors 
      Constructor Description
      ManagedThreadFactoryImpl​(String name, org.glassfish.enterprise.concurrent.ContextServiceImpl contextService, int priority)  
    • Constructor Detail

      • ManagedThreadFactoryImpl

        public ManagedThreadFactoryImpl​(String name,
                                        org.glassfish.enterprise.concurrent.ContextServiceImpl contextService,
                                        int priority)
    • Method Detail

      • getPriority

        public int getPriority()
        Returns:
        the priority set on new threads
      • createThread

        protected org.glassfish.enterprise.concurrent.AbstractManagedThread createThread​(Runnable r,
                                                                                         org.glassfish.enterprise.concurrent.spi.ContextHandle contextHandleForSetup)
        Overrides:
        createThread in class org.glassfish.enterprise.concurrent.ManagedThreadFactoryImpl
      • taskStarting

        public void taskStarting​(Thread t,
                                 org.glassfish.enterprise.concurrent.internal.ManagedFutureTask task)
        Overrides:
        taskStarting in class org.glassfish.enterprise.concurrent.ManagedThreadFactoryImpl
      • taskDone

        public void taskDone​(Thread t)
        Overrides:
        taskDone in class org.glassfish.enterprise.concurrent.ManagedThreadFactoryImpl