org.qi4j.api.composite

## Class CompositeContext<T extends TransientComposite>

- java.lang.Object
- - java.lang.ThreadLocal<T>
  - - org.qi4j.api.composite.CompositeContext<T>

-     public class CompositeContext<T extends TransientComposite>
      extends ThreadLocal<T>

  Thread-associated composites. This is basically a ThreadLocal which maintains a reference to a TransientComposite instance for each thread. This can be used to implement various context patterns without having to pass the context explicitly as a parameter to methods.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompositeContext(Module module, Class<T> type)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected T` | `initialValue()`
    `T` | `proxy()`

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

      `get, remove, set`

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

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

- - ### Constructor Detail

    - #### CompositeContext

          public CompositeContext(Module module,
                          Class<T> type)

  - ### Method Detail

    - #### initialValue

          protected T initialValue()

      Overrides:
        `initialValue` in class `ThreadLocal<T extends TransientComposite>`

    - #### proxy

          public T proxy()