|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jetty.plus.annotation.Injection
public class Injection
Injection Represents the injection of a resource into a target (method or field). The injection is performed by doing an ENC lookup using the jndi name provided, and setting the object obtained on the target.
Constructor Summary | |
---|---|
Injection()
|
Method Summary | |
---|---|
String |
getJndiName()
|
String |
getMappingName()
|
Member |
getTarget()
|
Class |
getTargetClass()
|
void |
inject(Object injectable)
Inject a value for a Resource from JNDI into an object |
void |
injectField(Field field,
Object injectable)
Inject value from jndi into a field of an instance |
void |
injectMethod(Method method,
Object injectable)
Inject value from jndi into a setter method of an instance |
Object |
lookupInjectedValue()
The Resource must already exist in the ENC of this webapp. |
void |
setJndiName(String jndiName)
|
void |
setMappingName(String mappingName)
|
void |
setTarget(Class clazz,
String targetName,
Class targetType)
|
void |
setTarget(Member target)
|
void |
setTargetClass(Class clazz)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Injection()
Method Detail |
---|
public Class getTargetClass()
public void setTargetClass(Class clazz)
name
- the _className to setpublic String getJndiName()
public void setJndiName(String jndiName)
jndiName
- the jndiName to setpublic String getMappingName()
public void setMappingName(String mappingName)
mappingName
- the mappingName to setpublic Member getTarget()
public void setTarget(Member target)
target
- the target to setpublic void setTarget(Class clazz, String targetName, Class targetType)
public void inject(Object injectable)
injectable
-
Exception
public Object lookupInjectedValue() throws NamingException
Exception
NamingException
public void injectField(Field field, Object injectable)
field
- injectable
- public void injectMethod(Method method, Object injectable)
method
- injectable
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |