|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Stax2ValidationSchemaFactoryProvider
Simple interface to be used for registering objects that
can construct XMLValidationSchemaFactory
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 XMLValidationSchemaFactory.newInstance(java.lang.String)
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 | |
---|---|
static String |
OSGI_SVC_PROP_IMPL_NAME
Service property that defines name of Stax2 implementation that this provider represents. |
static String |
OSGI_SVC_PROP_IMPL_VERSION
Service property that defines version of Stax2 implementation that this provider represents. |
static String |
OSGI_SVC_PROP_SCHEMA_TYPE
Service property that defines type of Schemas (one of constants from XMLValidationSchema ,
such as XMLValidationSchema.SCHEMA_ID_DTD )
that the schema factory this provider handles supports. |
Method Summary | |
---|---|
XMLValidationSchemaFactory |
createValidationSchemaFactory()
Method called to create a new XMLValidationSchemaFactory
instance. |
String |
getSchemaType()
Method that can be used to determine which schema type this provider (or, rather, factory instances of which provider constructs) supports. |
Field Detail |
---|
static final String OSGI_SVC_PROP_IMPL_NAME
static final String OSGI_SVC_PROP_IMPL_VERSION
static final String OSGI_SVC_PROP_SCHEMA_TYPE
XMLValidationSchema
,
such as XMLValidationSchema.SCHEMA_ID_DTD
)
that the schema factory this provider handles supports. Can be used
to locate proper provider for the schema type.
Method Detail |
---|
String getSchemaType()
XMLValidationSchemaFactory createValidationSchemaFactory()
XMLValidationSchemaFactory
instance. Each schema factory supports a single schema type;
so caller has to ensure that the factory it is using supports
schema it needs to instantiate. This can be done either by using
service properties, or by inspecting provider instances for
schema type they support (see getSchemaType()
).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |