org.apache.camel.spi
Interface Registry

All Known Implementing Classes:
CompositeRegistry, JndiRegistry, PropertyPlaceholderDelegateRegistry, SimpleRegistry

public interface Registry

Represents a service registry which may be implemented via a Spring ApplicationContext, via JNDI, a simple Map or the OSGi Service Registry

Version:

Method Summary
 Object lookup(String name)
          Looks up a service in the registry based purely on name, returning the service or null if it could not be found.
<T> T
lookup(String name, Class<T> type)
          Looks up a service in the registry, returning the service or null if it could not be found.
<T> Map<String,T>
lookupByType(Class<T> type)
          Looks up services in the registry by their type.
 

Method Detail

lookup

Object lookup(String name)
Looks up a service in the registry based purely on name, returning the service or null if it could not be found.

Parameters:
name - the name of the service
Returns:
the service from the registry or null if it could not be found

lookup

<T> T lookup(String name,
             Class<T> type)
Looks up a service in the registry, returning the service or null if it could not be found. cha

Parameters:
name - the name of the service
type - the type of the required service
Returns:
the service from the registry or null if it could not be found

lookupByType

<T> Map<String,T> lookupByType(Class<T> type)
Looks up services in the registry by their type.

Note: Not all registry implementations support this feature, such as the JndiRegistry.

Parameters:
type - the type of the registered services
Returns:
the types found, with their id as the key. Returns an empty Map if none found.


Apache CAMEL