Package nl.nn.adapterframework.jndi
Class ObjectFactoryBase<O,L>
- java.lang.Object
-
- nl.nn.adapterframework.jndi.ObjectFactoryBase<O,L>
-
- Type Parameters:
O
- Object class used by clientsL
- Class looked up
- All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean
- Direct Known Subclasses:
JndiObjectFactory
,ResourceBasedObjectFactory
public abstract class ObjectFactoryBase<O,L> extends Object implements org.springframework.beans.factory.DisposableBean
Baseclass for Object lookups.- Author:
- Gerrit van Brakel
-
-
Constructor Summary
Constructors Constructor Description ObjectFactoryBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description O
add(L object, String jndiName)
Add and augment an Object to this factory so it can be used without the need of a JNDI lookup.protected O
augment(L object, String objectName)
void
destroy()
O
get(String jndiName)
O
get(String jndiName, Properties jndiEnvironment)
protected abstract L
lookup(String jndiName, Properties jndiEnvironment)
Perform the actual lookup
-
-
-
Method Detail
-
lookup
protected abstract L lookup(String jndiName, Properties jndiEnvironment) throws NamingException
Perform the actual lookup- Throws:
NamingException
-
get
public O get(String jndiName) throws NamingException
- Throws:
NamingException
-
get
public O get(String jndiName, Properties jndiEnvironment) throws NamingException
- Throws:
NamingException
-
add
public O add(L object, String jndiName)
Add and augment an Object to this factory so it can be used without the need of a JNDI lookup. Should only be called during jUnit Tests or when registering an Object through Spring. Never through a JNDI lookup.
-
-