Package org.apache.camel.support.jndi
Class JndiBeanRepository
- java.lang.Object
-
- org.apache.camel.support.jndi.JndiBeanRepository
-
- All Implemented Interfaces:
org.apache.camel.spi.BeanRepository
public class JndiBeanRepository extends Object implements org.apache.camel.spi.BeanRepository
ABeanRepositoryimplementation which looks up the objects in JNDI
-
-
Constructor Summary
Constructors Constructor Description JndiBeanRepository()JndiBeanRepository(boolean standalone)Whether to use standalone mode, where the JNDI initial context factory is usingCamelInitialContextFactory.JndiBeanRepository(Map environment)JndiBeanRepository(Context context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected ContextcreateContext()<T> Set<T>findByType(Class<T> type)<T> Map<String,T>findByTypeWithName(Class<T> type)ContextgetContext()ObjectlookupByName(String name)<T> TlookupByNameAndType(String name, Class<T> type)voidsetContext(Context context)
-
-
-
Constructor Detail
-
JndiBeanRepository
public JndiBeanRepository()
-
JndiBeanRepository
public JndiBeanRepository(Map environment)
-
JndiBeanRepository
public JndiBeanRepository(Context context)
-
JndiBeanRepository
public JndiBeanRepository(boolean standalone)
Whether to use standalone mode, where the JNDI initial context factory is usingCamelInitialContextFactory.
-
-
Method Detail
-
lookupByNameAndType
public <T> T lookupByNameAndType(String name, Class<T> type)
- Specified by:
lookupByNameAndTypein interfaceorg.apache.camel.spi.BeanRepository
-
lookupByName
public Object lookupByName(String name)
- Specified by:
lookupByNamein interfaceorg.apache.camel.spi.BeanRepository
-
findByTypeWithName
public <T> Map<String,T> findByTypeWithName(Class<T> type)
- Specified by:
findByTypeWithNamein interfaceorg.apache.camel.spi.BeanRepository
-
findByType
public <T> Set<T> findByType(Class<T> type)
- Specified by:
findByTypein interfaceorg.apache.camel.spi.BeanRepository
-
close
public void close() throws NamingException- Throws:
NamingException
-
getContext
public Context getContext() throws NamingException
- Throws:
NamingException
-
setContext
public void setContext(Context context)
-
createContext
protected Context createContext() throws NamingException
- Throws:
NamingException
-
-