org.jboss.osgi.xml
Class XMLParserActivatorExt

java.lang.Object
  extended by org.jboss.osgi.xml.internal.XMLParserActivator
      extended by org.jboss.osgi.xml.XMLParserActivatorExt
All Implemented Interfaces:
BundleActivator, ServiceFactory

public class XMLParserActivatorExt
extends org.jboss.osgi.xml.internal.XMLParserActivator

Activate the XML parser using XMLParserActivatorExt

Since:
29-Apr-2009
Author:
thomas.diesler@jboss.com

Field Summary
 
Fields inherited from class org.jboss.osgi.xml.internal.XMLParserActivator
DOMCLASSFILE, DOMFACTORYNAME, PARSER_NAMESPACEAWARE, PARSER_VALIDATING, SAXCLASSFILE, SAXFACTORYNAME
 
Constructor Summary
XMLParserActivatorExt()
           
 
Method Summary
 void setDOMProperties(javax.xml.parsers.DocumentBuilderFactory factory, java.util.Hashtable props)
           Set the customizable DOM Parser Service Properties.
 void setSAXProperties(javax.xml.parsers.SAXParserFactory factory, java.util.Hashtable props)
           Set the customizable SAX Parser Service Properties.
 void start(BundleContext context)
          Called when this bundle is started so the Framework can perform the bundle-specific activities necessary to start this bundle.
 
Methods inherited from class org.jboss.osgi.xml.internal.XMLParserActivator
getService, stop, ungetService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLParserActivatorExt

public XMLParserActivatorExt()
Method Detail

start

public void start(BundleContext context)
           throws java.lang.Exception
Description copied from class: org.jboss.osgi.xml.internal.XMLParserActivator
Called when this bundle is started so the Framework can perform the bundle-specific activities necessary to start this bundle. This method can be used to register services or to allocate any resources that this bundle needs.

This method must complete and return to its caller in a timely manner.

This method attempts to register a SAX and DOM parser with the Framework's service registry.

Specified by:
start in interface BundleActivator
Overrides:
start in class org.jboss.osgi.xml.internal.XMLParserActivator
Parameters:
context - The execution context of the bundle being started.
Throws:
java.lang.Exception - If this method throws an exception, this bundle is marked as stopped and the Framework will remove this bundle's listeners, unregister all services registered by this bundle, and release all services used by this bundle.

setDOMProperties

public void setDOMProperties(javax.xml.parsers.DocumentBuilderFactory factory,
                             java.util.Hashtable props)
Description copied from class: org.jboss.osgi.xml.internal.XMLParserActivator

Set the customizable DOM Parser Service Properties.

This method attempts to instantiate a validating parser and a namespaceaware parser to determine if the parser can support those features. The appropriate properties are then set in the specified props object.

This method can be overridden to add additional DOM2 features and properties. If you want to be able to filter searches of the OSGi service registry, this method must put a key, value pair into the properties object for each feature or property. For example, properties.put("http://www.acme.com/features/foo", Boolean.TRUE);

Overrides:
setDOMProperties in class org.jboss.osgi.xml.internal.XMLParserActivator
Parameters:
factory - - the DocumentBuilderFactory object
props - - Hashtable of service properties.

setSAXProperties

public void setSAXProperties(javax.xml.parsers.SAXParserFactory factory,
                             java.util.Hashtable props)
Description copied from class: org.jboss.osgi.xml.internal.XMLParserActivator

Set the customizable SAX Parser Service Properties.

This method attempts to instantiate a validating parser and a namespaceaware parser to determine if the parser can support those features. The appropriate properties are then set in the specified properties object.

This method can be overridden to add additional SAX2 features and properties. If you want to be able to filter searches of the OSGi service registry, this method must put a key, value pair into the properties object for each feature or property. For example, properties.put("http://www.acme.com/features/foo", Boolean.TRUE);

Overrides:
setSAXProperties in class org.jboss.osgi.xml.internal.XMLParserActivator
Parameters:
factory - - the SAXParserFactory object
props - - the properties object for the service


Copyright © 2009. All Rights Reserved.