public class OsgiServiceRegistry
extends org.apache.camel.support.LifecycleStrategySupport
implements org.apache.camel.spi.Registry, org.apache.camel.Service, org.osgi.framework.ServiceListener
| Constructor and Description |
|---|
OsgiServiceRegistry(org.osgi.framework.BundleContext bc) |
| Modifier and Type | Method and Description |
|---|---|
<T> Set<T> |
findByType(Class<T> type) |
<T> Map<String,T> |
findByTypeWithName(Class<T> type) |
Object |
lookup(String name) |
<T> T |
lookup(String name,
Class<T> type) |
Object |
lookupByName(String name)
It's only support to look up the ServiceReference with Class name or service PID
|
<T> T |
lookupByNameAndType(String name,
Class<T> type)
Support to lookup the Object with filter with the (name=NAME) and class type
|
<T> Map<String,T> |
lookupByType(Class<T> type) |
void |
serviceChanged(org.osgi.framework.ServiceEvent event) |
void |
start() |
void |
stop() |
onComponentAdd, onComponentRemove, onContextStart, onContextStop, onEndpointAdd, onEndpointRemove, onErrorHandlerAdd, onErrorHandlerRemove, onRouteContextCreate, onRoutesAdd, onRoutesRemove, onServiceAdd, onServiceRemove, onThreadPoolAdd, onThreadPoolRemovepublic OsgiServiceRegistry(org.osgi.framework.BundleContext bc)
public <T> T lookupByNameAndType(String name, Class<T> type)
lookupByNameAndType in interface org.apache.camel.spi.Registrypublic Object lookupByName(String name)
lookupByName in interface org.apache.camel.spi.Registrypublic <T> Map<String,T> findByTypeWithName(Class<T> type)
findByTypeWithName in interface org.apache.camel.spi.Registrypublic <T> Set<T> findByType(Class<T> type)
findByType in interface org.apache.camel.spi.Registrypublic Object lookup(String name)
lookup in interface org.apache.camel.spi.Registrypublic <T> T lookup(String name, Class<T> type)
lookup in interface org.apache.camel.spi.Registrypublic <T> Map<String,T> lookupByType(Class<T> type)
lookupByType in interface org.apache.camel.spi.Registrypublic void start()
throws Exception
start in interface org.apache.camel.ServiceExceptionpublic void stop()
throws Exception
stop in interface org.apache.camel.ServiceExceptionpublic void serviceChanged(org.osgi.framework.ServiceEvent event)
serviceChanged in interface org.osgi.framework.ServiceListenerApache Camel