- java.lang.Object
-
- javax.xml.soap.SAAJMetaFactory
-
public abstract class SAAJMetaFactory extends java.lang.ObjectThe access point for the implementation classes of the factories defined in the SAAJ API. ThenewInstancemethods defined on factoriesSOAPFactoryandMessageFactoryin SAAJ 1.4 defer to instances of this class to do the actual object creation. The implementations ofnewInstance()methods (inSOAPFactoryandMessageFactory) that existed in SAAJ 1.2 have been updated to also delegate to the SAAJMetaFactory when the SAAJ 1.2 defined lookup fails to locate the Factory implementation class name.SAAJMetaFactory is a service provider interface and it uses similar lookup mechanism as other SAAJ factories to get actual instance:
- If a system property with name
javax.xml.soap.SAAJMetaFactoryexists then its value is assumed to be the fully qualified name of the implementation class. This phase of the look up enables per-JVM override of the SAAJ implementation. - If a system property with name
javax.xml.soap.MetaFactoryexists then its value is assumed to be the fully qualified name of the implementation class. This property, defined by previous specifications (up to 1.3), is still supported, but it is strongly recommended to migrate to new propertyjavax.xml.soap.SAAJMetaFactory. - Use the configuration file "jaxm.properties". The file is in standard
Propertiesformat and typically located in theconfdirectory of the Java installation. It contains the fully qualified name of the implementation class with keyjavax.xml.soap.SAAJMetaFactory. If no such property is defined, again, property with keyjavax.xml.soap.MetaFactoryis used. It is strongly recommended to migrate to new propertyjavax.xml.soap.SAAJMetaFactory. - Use the service-provider loading facilities, defined by the
ServiceLoaderclass, to attempt to locate and load an implementation of the service using the default loading mechanism. - Finally, if all the steps above fail, platform default implementation is used.
There are no public methods on this class.
- Since:
- 1.6, SAAJ 1.3
- If a system property with name
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringDEFAULT_META_FACTORY_CLASSprivate static java.lang.StringMETA_FACTORY_DEPRECATED_CLASS_PROPERTY
-
Constructor Summary
Constructors Modifier Constructor Description protectedSAAJMetaFactory()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) static SAAJMetaFactorygetInstance()Creates a new instance of a concreteSAAJMetaFactoryobject.protected abstract MessageFactorynewMessageFactory(java.lang.String protocol)Creates aMessageFactoryobject for the givenStringprotocol.protected abstract SOAPFactorynewSOAPFactory(java.lang.String protocol)Creates aSOAPFactoryobject for the givenStringprotocol.
-
-
-
Field Detail
-
META_FACTORY_DEPRECATED_CLASS_PROPERTY
private static final java.lang.String META_FACTORY_DEPRECATED_CLASS_PROPERTY
- See Also:
- Constant Field Values
-
DEFAULT_META_FACTORY_CLASS
private static final java.lang.String DEFAULT_META_FACTORY_CLASS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
static SAAJMetaFactory getInstance() throws SOAPException
Creates a new instance of a concreteSAAJMetaFactoryobject. The SAAJMetaFactory is an SPI, it pulls the creation of the other factories together into a single place. Changing out the SAAJMetaFactory has the effect of changing out the entire SAAJ implementation. Service providers provide the name of theirSAAJMetaFactoryimplementation. This method uses the lookup procedure specified injavax.xml.soapto locate and load theSAAJMetaFactoryclass.- Returns:
- a concrete
SAAJMetaFactoryobject - Throws:
SOAPException- if there is an error in creating theSAAJMetaFactory
-
newMessageFactory
protected abstract MessageFactory newMessageFactory(java.lang.String protocol) throws SOAPException
Creates aMessageFactoryobject for the givenStringprotocol.- Parameters:
protocol- aStringindicating the protocol- Returns:
- a
MessageFactory, not null - Throws:
SOAPException- if there is an error in creating the MessageFactory- See Also:
SOAPConstants.SOAP_1_1_PROTOCOL,SOAPConstants.SOAP_1_2_PROTOCOL,SOAPConstants.DYNAMIC_SOAP_PROTOCOL
-
newSOAPFactory
protected abstract SOAPFactory newSOAPFactory(java.lang.String protocol) throws SOAPException
Creates aSOAPFactoryobject for the givenStringprotocol.- Parameters:
protocol- aStringindicating the protocol- Returns:
- a
SOAPFactory, not null - Throws:
SOAPException- if there is an error in creating the SOAPFactory- See Also:
SOAPConstants.SOAP_1_1_PROTOCOL,SOAPConstants.SOAP_1_2_PROTOCOL,SOAPConstants.DYNAMIC_SOAP_PROTOCOL
-
-