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
ABeanRepository
implementation 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 void
close()
protected Context
createContext()
<T> Set<T>
findByType(Class<T> type)
<T> Map<String,T>
findByTypeWithName(Class<T> type)
Context
getContext()
Object
lookupByName(String name)
<T> T
lookupByNameAndType(String name, Class<T> type)
void
setContext(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:
lookupByNameAndType
in interfaceorg.apache.camel.spi.BeanRepository
-
lookupByName
public Object lookupByName(String name)
- Specified by:
lookupByName
in interfaceorg.apache.camel.spi.BeanRepository
-
findByTypeWithName
public <T> Map<String,T> findByTypeWithName(Class<T> type)
- Specified by:
findByTypeWithName
in interfaceorg.apache.camel.spi.BeanRepository
-
findByType
public <T> Set<T> findByType(Class<T> type)
- Specified by:
findByType
in 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
-
-