Class GroupedThreadFactory

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

    public final class GroupedThreadFactory
    extends java.lang.Object
    implements java.util.concurrent.ThreadFactory
    Thread factory for creating threads that belong to the specified thread group.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DELIMITER  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static GroupedThreadFactory groupedThreadFactory​(java.lang.String groupName)
      Returns thread factory for producing threads associated with the specified group name.
      java.lang.Thread newThread​(java.lang.Runnable r)  
      java.lang.ThreadGroup threadGroup()
      Returns the thread group associated with the factory.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • groupedThreadFactory

        public static GroupedThreadFactory groupedThreadFactory​(java.lang.String groupName)
        Returns thread factory for producing threads associated with the specified group name. The group name-space is hierarchical, based on slash-delimited name segments, e.g. onos/intent.
        Parameters:
        groupName - group name
        Returns:
        thread factory
      • threadGroup

        public java.lang.ThreadGroup threadGroup()
        Returns the thread group associated with the factory.
        Returns:
        thread group
      • newThread

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object