|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wamblee.test.jndi.JndiProxyFactory<T>
public class JndiProxyFactory<T>
Proxy factory that can provide contextual references to objects retrieved from JNDI. NOTE: This class is probably better suited as a production class, not a test support class. It needs to find a new home in a Java EE production utilities library.
| Nested Class Summary | |
|---|---|
static class |
JndiProxyFactory.JndiWiringException
Exception thrown in case an object cannot be retrieved from JNDI. |
| Constructor Summary | |
|---|---|
JndiProxyFactory(java.lang.Class<T> aClass,
java.lang.String aJndi)
Constructs the factory. |
|
| Method Summary | |
|---|---|
T |
getProxy()
Gets the proxy that delegates to the thread-specific instance set by #set(Object)
When at runtime the proxy cannot find lookup the object in JNDI, it
throws JndiProxyFactory.JndiWiringException. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JndiProxyFactory(java.lang.Class<T> aClass,
java.lang.String aJndi)
aClass - Interface class of the service to proxy.aJndi - JNDI name of the object to lookup.| Method Detail |
|---|
public T getProxy()
#set(Object)
When at runtime the proxy cannot find lookup the object in JNDI, it
throws JndiProxyFactory.JndiWiringException.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||