Class NamedThreadFactory

  • All Implemented Interfaces:
    java.util.concurrent.ThreadFactory

    public class NamedThreadFactory
    extends java.lang.Object
    implements java.util.concurrent.ThreadFactory
    • Constructor Summary

      Constructors 
      Constructor Description
      NamedThreadFactory​(java.lang.String name)  
      NamedThreadFactory​(java.util.concurrent.ThreadFactory factory, java.lang.String name)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.concurrent.ThreadFactory newInstance​(java.lang.String prefix)
      Used by ThreadTransformer for thread renaming
      static java.util.concurrent.ThreadFactory newInstance​(java.util.concurrent.ThreadFactory factory, java.lang.String prefix)
      Used by ThreadTransformer for thread renaming
      java.lang.Thread newThread​(java.lang.Runnable r)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NamedThreadFactory

        public NamedThreadFactory​(java.lang.String name)
      • NamedThreadFactory

        public NamedThreadFactory​(java.util.concurrent.ThreadFactory factory,
                                  java.lang.String name)
    • Method Detail

      • newInstance

        public static java.util.concurrent.ThreadFactory newInstance​(java.lang.String prefix)
        Used by ThreadTransformer for thread renaming
        Parameters:
        prefix - the prefix of name
        Returns:
        an instance of ThreadFactory
      • newInstance

        public static java.util.concurrent.ThreadFactory newInstance​(java.util.concurrent.ThreadFactory factory,
                                                                     java.lang.String prefix)
        Used by ThreadTransformer for thread renaming
        Parameters:
        factory - the factory delegate
        prefix - the prefix of name
        Returns:
        an instance of ThreadFactory
      • newThread

        public java.lang.Thread newThread​(java.lang.Runnable r)
        Specified by:
        newThread in interface java.util.concurrent.ThreadFactory