|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.enterprise.inject.spi.Unmanaged<T>
public class Unmanaged<T>
Helper class for injecting and calling lifecycle callbacks unmanaged instances for use by framework and library integrators.
Unmanaged<Foo> unmanagedFoo = new Unmanaged<Foo>(Foo.class); UnmanagedInstance<Foo> fooInstance = unmanagedFoo.newInstance(); Foo foo = fooInstance.produce().inject().postConstruct().get(); ... // Use the foo instance fooInstance.preDestroy().dispose();
An instance of this class can be safely held for the lifetime of the application.
Unmanaged.UnmanagedInstances created by this class are not suitable for sharing between threads.
| Nested Class Summary | |
|---|---|
static class |
Unmanaged.UnmanagedInstance<T>
Represents a non-contextual instance. |
| Constructor Summary | |
|---|---|
Unmanaged(BeanManager manager,
java.lang.Class<T> clazz)
Create an injector for the given class |
|
Unmanaged(java.lang.Class<T> clazz)
Create an injector for the given class, using the current bean manager |
|
| Method Summary | |
|---|---|
Unmanaged.UnmanagedInstance<T> |
newInstance()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Unmanaged(BeanManager manager,
java.lang.Class<T> clazz)
public Unmanaged(java.lang.Class<T> clazz)
| Method Detail |
|---|
public Unmanaged.UnmanagedInstance<T> newInstance()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||