org.apache.camel.core.osgi
Class OsgiServiceRegistry
java.lang.Object
org.apache.camel.support.LifecycleStrategySupport
org.apache.camel.core.osgi.OsgiServiceRegistry
- All Implemented Interfaces:
- org.apache.camel.spi.LifecycleStrategy, org.apache.camel.spi.Registry
public class OsgiServiceRegistry
- extends org.apache.camel.support.LifecycleStrategySupport
- implements org.apache.camel.spi.Registry
The OsgiServiceRegistry support to get the service object from the bundle context
Methods inherited from class org.apache.camel.support.LifecycleStrategySupport |
onComponentAdd, onComponentRemove, onContextStart, onEndpointAdd, onEndpointRemove, onErrorHandlerAdd, onErrorHandlerRemove, onRouteContextCreate, onRoutesAdd, onRoutesRemove, onServiceAdd, onServiceRemove, onThreadPoolAdd, onThreadPoolRemove |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OsgiServiceRegistry
public OsgiServiceRegistry(org.osgi.framework.BundleContext bc)
lookupByNameAndType
public <T> T lookupByNameAndType(String name,
Class<T> type)
- Support to lookup the Object with filter with the (name=NAME) and class type
- Specified by:
lookupByNameAndType
in interface org.apache.camel.spi.Registry
lookupByName
public Object lookupByName(String name)
- It's only support to look up the ServiceReference with Class name
- Specified by:
lookupByName
in interface org.apache.camel.spi.Registry
findByTypeWithName
public <T> Map<String,T> findByTypeWithName(Class<T> type)
- Specified by:
findByTypeWithName
in interface org.apache.camel.spi.Registry
findByType
public <T> Set<T> findByType(Class<T> type)
- Specified by:
findByType
in interface org.apache.camel.spi.Registry
lookup
public Object lookup(String name)
- Specified by:
lookup
in interface org.apache.camel.spi.Registry
lookup
public <T> T lookup(String name,
Class<T> type)
- Specified by:
lookup
in interface org.apache.camel.spi.Registry
lookupByType
public <T> Map<String,T> lookupByType(Class<T> type)
- Specified by:
lookupByType
in interface org.apache.camel.spi.Registry
onContextStop
public void onContextStop(org.apache.camel.CamelContext context)
- Specified by:
onContextStop
in interface org.apache.camel.spi.LifecycleStrategy
- Overrides:
onContextStop
in class org.apache.camel.support.LifecycleStrategySupport
Apache Camel