Package org.codehaus.stax2.osgi
Interface Stax2OutputFactoryProvider
public interface Stax2OutputFactoryProvider
Simple interface to be used for registering objects that
can construct
XMLOutputFactory2
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 XMLOutputFactory.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
Fields -
Method Summary
-
Field Details
-
OSGI_SVC_PROP_IMPL_NAME
Service property that defines name of Stax2 implementation that this provider represents.- See Also:
-
OSGI_SVC_PROP_IMPL_VERSION
Service property that defines version of Stax2 implementation that this provider represents.- See Also:
-
-
Method Details
-
createOutputFactory
XMLOutputFactory2 createOutputFactory()Method called to create a newXMLOutputFactory2
instance.- Returns:
- Output factory configured to implementation-specific default settings (some of which are mandated by Stax and Stax2 specifications)
-