Class QpidJMSThreadFactory

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

    public class QpidJMSThreadFactory
    extends java.lang.Object
    implements java.util.concurrent.ThreadFactory
    Simple ThreadFactory object
    • Constructor Summary

      Constructors 
      Constructor Description
      QpidJMSThreadFactory​(java.lang.String threadName, boolean daemon)
      Creates a new Thread factory that will create threads with the given name and daemon state.
      QpidJMSThreadFactory​(java.lang.String threadName, boolean daemon, java.util.concurrent.atomic.AtomicReference<java.lang.Thread> threadTracker)
      Creates a new Thread factory that will create threads with the given name and daemon state.
      QpidJMSThreadFactory​(java.util.function.Function<java.lang.Thread,​java.lang.String> threadNamingStrategy, boolean daemon)
      Creates a new Thread factory that will create threads with the provided thread naming function and daemon state.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Thread newThread​(java.lang.Runnable target)  
      • Methods inherited from class java.lang.Object

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

      • QpidJMSThreadFactory

        public QpidJMSThreadFactory​(java.lang.String threadName,
                                    boolean daemon)
        Creates a new Thread factory that will create threads with the given name and daemon state.
        Parameters:
        threadName - the name that will be used for each thread created.
        daemon - should the created thread be a daemon thread.
      • QpidJMSThreadFactory

        public QpidJMSThreadFactory​(java.lang.String threadName,
                                    boolean daemon,
                                    java.util.concurrent.atomic.AtomicReference<java.lang.Thread> threadTracker)
        Creates a new Thread factory that will create threads with the given name and daemon state. This constructor accepts an AtomicReference to track the Thread that was last created from this factory. This is most useful for a single threaded executor where the Id of the internal execution thread needs to be known for some reason.
        Parameters:
        threadName - the name that will be used for each thread created.
        daemon - should the created thread be a daemon thread.
        threadTracker - AtomicReference that will be updated any time a new Thread is created.
      • QpidJMSThreadFactory

        public QpidJMSThreadFactory​(java.util.function.Function<java.lang.Thread,​java.lang.String> threadNamingStrategy,
                                    boolean daemon)
        Creates a new Thread factory that will create threads with the provided thread naming function and daemon state.
        Parameters:
        threadNamingStrategy - the naming strategy that will be used for each thread created.
        daemon - should the created thread be a daemon thread.
    • Method Detail

      • newThread

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