|
||||||||||
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 unmanagedFoo = new Unmanaged(Foo.class); UnmanagedInstance fooInstance = unManagedFoo.newInstance(); Foo foo = fooInstance.produce().inject().postConstruct(); ... // Use the foo instance fooInstance.preDestroy().dispose();
An instance of this class can be safely held for the lifetime of the application.
Unmanaged.UnmanagedInstance
s 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,
Class<T> clazz)
Create an injector for the given class |
|
Unmanaged(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, Class<T> clazz)
public Unmanaged(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 |