com.h3c.util.concurrent

## Class NamedCallable<T>

- java.lang.Object
- - com.h3c.util.concurrent.NamedCallable<T>

- Type Parameters:
    `T` - type of the result
  All Implemented Interfaces:
    Described, Callable<T>

      public class NamedCallable<T>
      extends Object
      implements Callable<T>, Described

  Callable decorator that names the thread it executes on.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NamedCallable(String name, Callable<T> delegate)` Creates a named callable.

  - ### Method Summary

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

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

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

- - ### Constructor Detail

    - #### NamedCallable

          public NamedCallable(String name,
                       Callable<T> delegate)

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

  - ### Method Detail

    - #### call

          public T call()
                 throws Exception

      Specified by:
        `call` in interface `Callable<T>`
      Throws:
        `Exception`

    - #### 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.