public class NamespaceManager
extends java.lang.Object
implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
| Modifier and Type | Field and Description |
|---|---|
private org.osgi.framework.BundleContext |
context
OSGi Environment
|
private org.osgi.framework.ServiceRegistration |
enResolverRegistration
ServiceRegistration object returned by OSGi when registering the NamespacePlugins instance as a service
|
private java.lang.String |
extenderInfo |
private static org.apache.commons.logging.Log |
log |
private static java.lang.String |
META_INF |
private NamespacePlugins |
namespacePlugins
The set of all namespace plugins known to the extender
|
private org.osgi.framework.ServiceRegistration |
nsResolverRegistration
ServiceRegistration object returned by OSGi when registering the NamespacePlugins instance as a service
|
private static java.lang.String |
SPRING_HANDLERS |
private static java.lang.String |
SPRING_SCHEMAS |
| Constructor and Description |
|---|
NamespaceManager(org.osgi.framework.BundleContext context)
Constructs a new
NamespaceManager instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
void |
destroy() |
NamespacePlugins |
getNamespacePlugins() |
private boolean |
hasCompatibleNamespaceType(org.osgi.framework.Bundle bundle) |
void |
maybeAddNamespaceHandlerFor(org.osgi.framework.Bundle bundle,
boolean isLazyBundle)
Registers the namespace plugin handler if this bundle defines handler mapping or schema mapping resources.
|
void |
maybeRemoveNameSpaceHandlerFor(org.osgi.framework.Bundle bundle)
Removes the target bundle from the set of those known to provide handler or schema mappings.
|
private void |
registerResolverServices()
Registers the NamespacePlugins instance as an Osgi Resolver service
|
private void |
unregisterResolverService()
Unregisters the NamespaceHandler and EntityResolver service
|
private static final org.apache.commons.logging.Log log
private NamespacePlugins namespacePlugins
private org.osgi.framework.ServiceRegistration nsResolverRegistration
private org.osgi.framework.ServiceRegistration enResolverRegistration
private final org.osgi.framework.BundleContext context
private final java.lang.String extenderInfo
private static final java.lang.String META_INF
private static final java.lang.String SPRING_HANDLERS
private static final java.lang.String SPRING_SCHEMAS
public NamespaceManager(org.osgi.framework.BundleContext context)
NamespaceManager instance.context - containing bundle contextpublic void maybeAddNamespaceHandlerFor(org.osgi.framework.Bundle bundle,
boolean isLazyBundle)
bundle - target bundleisLazyBundle - indicator if the bundle analyzed is lazily activatedprivate boolean hasCompatibleNamespaceType(org.osgi.framework.Bundle bundle)
public void maybeRemoveNameSpaceHandlerFor(org.osgi.framework.Bundle bundle)
bundle - handler bundleprivate void registerResolverServices()
private void unregisterResolverService()
public NamespacePlugins getNamespacePlugins()
public void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanpublic void destroy()
destroy in interface org.springframework.beans.factory.DisposableBean