com.h3c.util.concurrent

## Class NamedRunnable

- java.lang.Object
- - com.h3c.util.concurrent.NamedRunnable

- All Implemented Interfaces:
    Described, Runnable

      public class NamedRunnable
      extends Object
      implements Runnable, Described

  Runnable decorator that names the thread it executes on.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NamedRunnable(String name, Runnable delegate)` Creates a named runnable.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `description()` Returns the description of the entity.
    `String` | `name()` Returns the name of the entity.
    `void` | `run()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### NamedRunnable

          public NamedRunnable(String name,
                       Runnable delegate)

      Creates a named runnable.
      Parameters:
        `name` - name
        `delegate` - runnable to decorate by naming the thread

  - ### Method Detail

    - #### run

          public void run()

      Specified by:
        `run` in interface `Runnable`

    - #### name

          public String name()

      Description copied from interface: `Described`
      Returns the name of the entity.
      Specified by:
        `name` in interface `Described`
      Returns:
        name of the entity

    - #### description

          public String description()

      Description copied from interface: `Described`
      Returns the description of the entity.
      Specified by:
        `description` in interface `Described`
      Returns:
        entity description

Copyright © 2014. All Rights Reserved.