Top Description Fields Methods
org.codehaus.stax2.osgi

public Interface Stax2InputFactoryProvider

Imports
org.codehaus.stax2.XMLInputFactory2, .XMLStreamProperties

Simple interface to be used for registering objects that can construct XMLInputFactory2 instances with OSGi framework. The added indirection (provider constructing factory) is needed because of impedance between OSGi service objects (which are essentially singletons) and Stax/Stax2 factories which are not.

Note

implementations of provider should NOT use introspection via javax.xml.stream.XMLInputFactory#newInstance as it will not work with OSGi. Instead, providers should directly construct instances of concrete factory they represent. That is, there will be one provider implementation per concrete Stax/Stax2 implementation

Field Summary

Modifier and TypeField and Description
public static final String
OSGI_SVC_PROP_IMPL_NAME

Service property that defines name of Stax2 implementation that this provider represents.

public static final String
OSGI_SVC_PROP_IMPL_VERSION

Service property that defines version of Stax2 implementation that this provider represents.

Method Summary

Modifier and TypeMethod and Description
public XMLInputFactory2

Returns:

Input factory configured to implementation-specific default settings (some of which are mandated by Stax and Stax2 specifications)
createInputFactory
()

Method called to create a new XMLInputFactory2 instance.

Field Detail

OSGI_SVC_PROP_IMPL_NAMEback to summary
public static final String OSGI_SVC_PROP_IMPL_NAME

Service property that defines name of Stax2 implementation that this provider represents.

OSGI_SVC_PROP_IMPL_VERSIONback to summary
public static final String OSGI_SVC_PROP_IMPL_VERSION

Service property that defines version of Stax2 implementation that this provider represents.

Method Detail

createInputFactoryback to summary
public XMLInputFactory2 createInputFactory()

Method called to create a new XMLInputFactory2 instance.

Returns:XMLInputFactory2

Input factory configured to implementation-specific default settings (some of which are mandated by Stax and Stax2 specifications)