org.apache.aries.blueprint.namespace
Class NamespaceHandlerRegistryImpl
java.lang.Object
org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl
- All Implemented Interfaces:
- NamespaceHandlerRegistry, org.osgi.util.tracker.ServiceTrackerCustomizer
public class NamespaceHandlerRegistryImpl
- extends Object
- implements NamespaceHandlerRegistry, org.osgi.util.tracker.ServiceTrackerCustomizer
Default implementation of the NamespaceHandlerRegistry.
This registry will track NamespaceHandler objects in the OSGi registry and make
them available, calling listeners when handlers are registered or unregistered.
- Version:
- $Rev: 1135629 $, $Date: 2011-06-14 16:01:01 +0100 (Tue, 14 Jun 2011) $
Method Summary |
Object |
addingService(org.osgi.framework.ServiceReference reference)
|
void |
destroy()
Destroy this registry |
protected static Map<URI,org.apache.aries.blueprint.NamespaceHandler> |
findHandlers(Map<URI,Set<org.apache.aries.blueprint.NamespaceHandler>> allHandlers,
Set<URI> namespaces,
org.osgi.framework.Bundle bundle)
|
org.apache.aries.blueprint.parser.NamespaceHandlerSet |
getNamespaceHandlers(Set<URI> uris,
org.osgi.framework.Bundle bundle)
Retrieve the NamespaceHandler for the specified URI. |
Schema |
getSchema(Map<URI,org.apache.aries.blueprint.NamespaceHandler> handlers)
|
void |
modifiedService(org.osgi.framework.ServiceReference reference,
Object service)
|
void |
registerHandler(org.apache.aries.blueprint.NamespaceHandler handler,
Map properties)
|
void |
removedService(org.osgi.framework.ServiceReference reference,
Object service)
|
protected void |
removeSchemasFor(org.apache.aries.blueprint.NamespaceHandler handler)
|
void |
unregisterHandler(org.apache.aries.blueprint.NamespaceHandler handler,
Map properties)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BLUEPRINT_NAMESPACE
public static final URI BLUEPRINT_NAMESPACE
NAMESPACE
public static final String NAMESPACE
- See Also:
- Constant Field Values
NamespaceHandlerRegistryImpl
public NamespaceHandlerRegistryImpl(org.osgi.framework.BundleContext bundleContext)
addingService
public Object addingService(org.osgi.framework.ServiceReference reference)
- Specified by:
addingService
in interface org.osgi.util.tracker.ServiceTrackerCustomizer
modifiedService
public void modifiedService(org.osgi.framework.ServiceReference reference,
Object service)
- Specified by:
modifiedService
in interface org.osgi.util.tracker.ServiceTrackerCustomizer
removedService
public void removedService(org.osgi.framework.ServiceReference reference,
Object service)
- Specified by:
removedService
in interface org.osgi.util.tracker.ServiceTrackerCustomizer
registerHandler
public void registerHandler(org.apache.aries.blueprint.NamespaceHandler handler,
Map properties)
unregisterHandler
public void unregisterHandler(org.apache.aries.blueprint.NamespaceHandler handler,
Map properties)
getNamespaceHandlers
public org.apache.aries.blueprint.parser.NamespaceHandlerSet getNamespaceHandlers(Set<URI> uris,
org.osgi.framework.Bundle bundle)
- Description copied from interface:
NamespaceHandlerRegistry
- Retrieve the
NamespaceHandler
for the specified URI. Make sure
- Specified by:
getNamespaceHandlers
in interface NamespaceHandlerRegistry
- Parameters:
uris
- the namespace identifying the namespace handlerbundle
- the blueprint bundle to be checked for class space consistency
- Returns:
- a set of registered
NamespaceHandler
s compatible with the class space of the given bundle
destroy
public void destroy()
- Description copied from interface:
NamespaceHandlerRegistry
- Destroy this registry
- Specified by:
destroy
in interface NamespaceHandlerRegistry
getSchema
public Schema getSchema(Map<URI,org.apache.aries.blueprint.NamespaceHandler> handlers)
throws IOException,
SAXException
- Throws:
IOException
SAXException
removeSchemasFor
protected void removeSchemasFor(org.apache.aries.blueprint.NamespaceHandler handler)
findHandlers
protected static Map<URI,org.apache.aries.blueprint.NamespaceHandler> findHandlers(Map<URI,Set<org.apache.aries.blueprint.NamespaceHandler>> allHandlers,
Set<URI> namespaces,
org.osgi.framework.Bundle bundle)
Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.