Class NamedRunnable

  • All Implemented Interfaces:
    Runnable

    public abstract class NamedRunnable
    extends Object
    implements Runnable
    Runnable implementation which always sets its thread name.
    • Field Detail

      • name

        protected final String name
    • Constructor Detail

      • NamedRunnable

        public NamedRunnable​(String format,
                             Object... args)
    • Method Detail

      • run

        public final void run()
        Description copied from interface: Runnable
        Starts executing the active part of the class' code. This method is called when a thread is started that has been created with a class which implements Runnable.
        Specified by:
        run in interface Runnable
      • execute

        protected abstract void execute()