public class NamespaceHandlerRegistryImpl extends Object implements NamespaceHandlerRegistry, org.osgi.util.tracker.ServiceTrackerCustomizer
Modifier and Type | Class and Description |
---|---|
static class |
NamespaceHandlerRegistryImpl.LRUMap<K,V> |
protected class |
NamespaceHandlerRegistryImpl.NamespaceHandlerSetImpl |
NamespaceHandlerRegistry.Listener, NamespaceHandlerRegistry.NamespaceHandlerSet
Modifier and Type | Field and Description |
---|---|
static URI |
BLUEPRINT_NAMESPACE |
static String |
NAMESPACE |
Constructor and Description |
---|
NamespaceHandlerRegistryImpl(org.osgi.framework.BundleContext bundleContext) |
Modifier and Type | Method and Description |
---|---|
Object |
addingService(org.osgi.framework.ServiceReference reference) |
void |
destroy()
Destroy this registry
|
protected static Map<URI,NamespaceHandler> |
findHandlers(Map<URI,Set<NamespaceHandler>> allHandlers,
Set<URI> namespaces,
org.osgi.framework.Bundle bundle) |
NamespaceHandlerRegistry.NamespaceHandlerSet |
getNamespaceHandlers(Set<URI> uris,
org.osgi.framework.Bundle bundle)
Retrieve the
NamespaceHandler for the specified URI. |
Schema |
getSchema(Map<URI,NamespaceHandler> handlers) |
void |
modifiedService(org.osgi.framework.ServiceReference reference,
Object service) |
void |
registerHandler(NamespaceHandler handler,
Map properties) |
void |
removedService(org.osgi.framework.ServiceReference reference,
Object service) |
protected void |
removeSchemasFor(NamespaceHandler handler) |
void |
unregisterHandler(NamespaceHandler handler,
Map properties) |
public static final URI BLUEPRINT_NAMESPACE
public static final String NAMESPACE
public NamespaceHandlerRegistryImpl(org.osgi.framework.BundleContext bundleContext)
public Object addingService(org.osgi.framework.ServiceReference reference)
addingService
in interface org.osgi.util.tracker.ServiceTrackerCustomizer
public void modifiedService(org.osgi.framework.ServiceReference reference, Object service)
modifiedService
in interface org.osgi.util.tracker.ServiceTrackerCustomizer
public void removedService(org.osgi.framework.ServiceReference reference, Object service)
removedService
in interface org.osgi.util.tracker.ServiceTrackerCustomizer
public void registerHandler(NamespaceHandler handler, Map properties)
public void unregisterHandler(NamespaceHandler handler, Map properties)
public NamespaceHandlerRegistry.NamespaceHandlerSet getNamespaceHandlers(Set<URI> uris, org.osgi.framework.Bundle bundle)
NamespaceHandlerRegistry
NamespaceHandler
for the specified URI. Make suregetNamespaceHandlers
in interface NamespaceHandlerRegistry
uris
- the namespace identifying the namespace handlerbundle
- the blueprint bundle to be checked for class space consistencyNamespaceHandler
s compatible with the class space of the given bundlepublic void destroy()
NamespaceHandlerRegistry
destroy
in interface NamespaceHandlerRegistry
public Schema getSchema(Map<URI,NamespaceHandler> handlers) throws IOException, SAXException
IOException
SAXException
protected void removeSchemasFor(NamespaceHandler handler)
protected static Map<URI,NamespaceHandler> findHandlers(Map<URI,Set<NamespaceHandler>> allHandlers, Set<URI> namespaces, org.osgi.framework.Bundle bundle)
Copyright © 2015. All rights reserved.