public class OMAbstractFactory extends Object
The getMetaFactory()
method returns the default OMMetaFactory
instance.
See the Javadoc of the getMetaFactory()
method for details about how this
instance is determined.
The getOMFactory()
, getSOAP11Factory()
and getSOAP12Factory()
methods return default instances for plain XML, SOAP 1.1 and SOAP 1.2 object model factories.
They are convenience methods calling getMetaFactory()
and then delegating to the
returned OMMetaFactory
.
Note that while getMetaFactory()
always returns the same instance, the other methods
may return new instances on every invocation, depending on the OMMetaFactory
implementation.
Modifier and Type | Field and Description |
---|---|
static String |
META_FACTORY_NAME_PROPERTY |
Modifier and Type | Method and Description |
---|---|
static OMMetaFactory |
getMetaFactory()
Get the default meta factory instance.
|
static OMFactory |
getOMFactory()
Get the default OM factory instance.
|
static SOAPFactory |
getSOAP11Factory()
Get the default SOAP 1.1 OM factory instance.
|
static SOAPFactory |
getSOAP12Factory()
Get the default SOAP 1.2 OM factory instance.
|
static void |
setMetaFactory(OMMetaFactory newMetaFactory)
Explicitly set a meta factory instance.
|
public static final String META_FACTORY_NAME_PROPERTY
public static void setMetaFactory(OMMetaFactory newMetaFactory)
getMetaFactory()
. Note that this is
an application wide setting. More precisely, the configured meta factory
will be used by all classes loaded from the class loader where Axiom is
deployed and all its child class loaders. Therefore this method should be
used with care and only be invoked during the initialization of the
application.
When Axiom is deployed as a bundle in an OSGi environment, this method will be used to inject the meta factory instance from the implementation bundle.
newMetaFactory
- the new meta factory instance, or null
to revert
to the default meta factory instance determined by the
org.apache.axiom.om.OMMetaFactory
system propertypublic static OMMetaFactory getMetaFactory()
setMetaFactory(OMMetaFactory)
, then that
instance is returned. Note that this will be the case in an OSGi runtime, where
setMetaFactory(OMMetaFactory)
is invoked by a helper component that is part of
Axiom.
org.apache.axiom.om.OMMetaFactory
system property. This method uses
System.getProperty(String)
to determine the value of the system property. A
SecurityException
thrown by this method is simply ignored and the lookup procedure
continues.
META-INF/services/org.apache.axiom.om.OMMetaFactory
in jars in the class path.
OMException
- if the factory's implementation class can't be found or if the class can't be
instantiatedpublic static OMFactory getOMFactory()
OMException
- if the factory's implementation class can't be found
or if the class can't be instantiatedpublic static SOAPFactory getSOAP11Factory()
OMException
- if the factory's implementation class can't be found
or if the class can't be instantiatedpublic static SOAPFactory getSOAP12Factory()
OMException
- if the factory's implementation class can't be found
or if the class can't be instantiatedCopyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.