|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.enterprise.container.common.impl.util.InjectionManagerImpl
@Service public class InjectionManagerImpl
Implementation of InjectionManager.
| Constructor Summary | |
|---|---|
InjectionManagerImpl()
|
|
| Method Summary | ||
|---|---|---|
|
createManagedObject(Class<T> clazz)
Create a managed object for the given class. |
|
|
createManagedObject(Class<T> clazz,
boolean invokePostConstruct)
Create a managed object for the given class. |
|
void |
destroyManagedObject(Object managedObject)
Destroy a managed object that was created via createManagedObject. |
|
void |
destroyManagedObject(Object managedObject,
boolean validate)
Destroy a managed object that was created via createManagedObject. |
|
void |
injectClass(Class clazz,
JndiNameEnvironment componentEnv)
Inject the injectable resources from the given component environment into a Class instance. |
|
void |
injectClass(Class clazz,
JndiNameEnvironment componentEnv,
boolean invokePostConstruct)
Inject the injectable resources from the given component environment into a Class instance. |
|
void |
injectInstance(Object instance)
Inject the given object instance with the resources from its component environment. |
|
void |
injectInstance(Object instance,
boolean invokePostConstruct)
Inject the given object instance with the resources from its component environment. |
|
void |
injectInstance(Object instance,
JndiNameEnvironment componentEnv)
Inject the injectable resources from the given component environment into an object instance. |
|
void |
injectInstance(Object instance,
JndiNameEnvironment componentEnv,
boolean invokePostConstruct)
Inject the injectable resources from the given component environment into an object instance. |
|
void |
injectInstance(Object instance,
String componentId,
boolean invokePostConstruct)
Inject the injectable resources for the given component id into an object instance. |
|
void |
invokeClassPreDestroy(Class clazz,
JndiNameEnvironment componentEnv)
Invoke any static @PreDestroy methods defined on the class (and super-classes). |
|
void |
invokeInstancePostConstruct(Object instance,
JndiNameEnvironment componentEnv)
Invoke any @PostConstruct methods defined on the instance's class (and super-classes). |
|
void |
invokeInstancePreDestroy(Object instance)
Invoke any @PreDestroy methods defined on the instance's class (and super-classes). |
|
void |
invokeInstancePreDestroy(Object instance,
JndiNameEnvironment componentEnv)
Invoke any @PreDestroy methods defined on the instance's class (and super-classes). |
|
void |
postConstruct()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InjectionManagerImpl()
| Method Detail |
|---|
public void postConstruct()
postConstruct in interface org.jvnet.hk2.component.PostConstruct
public void injectInstance(Object instance)
throws InjectionException
InjectionManager
injectInstance in interface InjectionManagerInjectionException - Thrown if an error occurs during injection
public void injectInstance(Object instance,
boolean invokePostConstruct)
throws InjectionException
InjectionManager
injectInstance in interface InjectionManagerInjectionException - Thrown if an error occurs during injection
public void injectInstance(Object instance,
JndiNameEnvironment componentEnv)
throws InjectionException
InjectionManager
injectInstance in interface InjectionManagerInjectionException - Thrown if an error occurs during injection
public void injectInstance(Object instance,
JndiNameEnvironment componentEnv,
boolean invokePostConstruct)
throws InjectionException
InjectionManager
injectInstance in interface InjectionManagerinvokePostConstruct - if true, invoke any @PostConstruct methods
on the instance's class(and super-classes) after injection.
InjectionException - Thrown if an error occurs during injection
public void injectInstance(Object instance,
String componentId,
boolean invokePostConstruct)
throws InjectionException
InjectionManager
injectInstance in interface InjectionManagerinvokePostConstruct - if true, invoke any @PostConstruct methods
on the instance's class(and super-classes) after injection.
InjectionException - Thrown if an error occurs during injection
public void injectClass(Class clazz,
JndiNameEnvironment componentEnv)
throws InjectionException
InjectionManager
injectClass in interface InjectionManagerInjectionException - Thrown if an error occurs during injection
public void injectClass(Class clazz,
JndiNameEnvironment componentEnv,
boolean invokePostConstruct)
throws InjectionException
InjectionManager
injectClass in interface InjectionManagerinvokePostConstruct - if true, invoke any @PostConstruct methods
on the class(and super-classes) after injection.
InjectionException - Thrown if an error occurs during injection
public void invokeInstancePreDestroy(Object instance,
JndiNameEnvironment componentEnv)
throws InjectionException
InjectionManager
invokeInstancePreDestroy in interface InjectionManagerInjectionException - Thrown if an error occurs
public void invokeInstancePostConstruct(Object instance,
JndiNameEnvironment componentEnv)
throws InjectionException
InjectionManager
invokeInstancePostConstruct in interface InjectionManagerInjectionException - Thrown if an error occurs
public void invokeInstancePreDestroy(Object instance)
throws InjectionException
InjectionManager
invokeInstancePreDestroy in interface InjectionManagerInjectionException - Thrown if an error occurs
public void invokeClassPreDestroy(Class clazz,
JndiNameEnvironment componentEnv)
throws InjectionException
InjectionManager
invokeClassPreDestroy in interface InjectionManagerInjectionException - Thrown if an error occurs
public <T> T createManagedObject(Class<T> clazz)
throws InjectionException
createManagedObject in interface InjectionManagerclazz - Class to be instantiated
InjectionException
public <T> T createManagedObject(Class<T> clazz,
boolean invokePostConstruct)
throws InjectionException
createManagedObject in interface InjectionManagerclazz - Class to be instantiatedinvokePostConstruct - if true, invoke any @PostConstruct methods
on the instance's class(and super-classes) after injection.
InjectionException
public void destroyManagedObject(Object managedObject)
throws InjectionException
destroyManagedObject in interface InjectionManagermanagedObject -
InjectionException
public void destroyManagedObject(Object managedObject,
boolean validate)
throws InjectionException
destroyManagedObject in interface InjectionManagermanagedObject - validate - if false, do nothing if the instance is not registred
InjectionException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||