org.wamblee.general
Class LookupProxyFactory<T>
java.lang.Object
org.wamblee.general.LookupProxyFactory<T>
public class LookupProxyFactory<T>
- extends Object
Proxy factory that can provide contextual references to objects retrieved
through a lookup mechanism. The returned proxies are serializable.
- Author:
- Erik Brakkee
|
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 LookupProxyFactory.LookupException. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LookupProxyFactory
public LookupProxyFactory(Class<T> aClass,
LookupProxyFactory.Lookup aLookup)
- Constructs the factory.
- Parameters:
aClass - Interface class of the service to proxy.aJndi - JNDI name of the object to lookup.
getProxy
public 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 LookupProxyFactory.LookupException.
- Returns:
- Proxy.
Copyright © 2011. All Rights Reserved.