Package org.apache.axis.encoding.ser
Class BaseSerializerFactory
- java.lang.Object
-
- org.apache.axis.encoding.ser.BaseFactory
-
- org.apache.axis.encoding.ser.BaseSerializerFactory
-
- All Implemented Interfaces:
java.io.Serializable,SerializerFactory,SerializerFactory
- Direct Known Subclasses:
ArraySerializerFactory,Base64SerializerFactory,BeanSerializerFactory,CalendarSerializerFactory,CastorEnumTypeSerializerFactory,CastorSerializerFactory,DateSerializerFactory,DocumentSerializerFactory,ElementSerializerFactory,EnumSerializerFactory,HexSerializerFactory,JAFDataHandlerSerializerFactory,MapSerializerFactory,QNameSerializerFactory,SimpleListSerializerFactory,SimpleSerializerFactory,TimeSerializerFactory,VectorSerializerFactory,XmlBeanSerializerFactory
public abstract class BaseSerializerFactory extends BaseFactory implements SerializerFactory
Base class for Axis Serialization Factory classes for code reuse- Author:
- Rich Scheuerle
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.reflect.MethodgetSerializerprotected java.lang.ClassjavaTypeprotected static org.apache.commons.logging.Loglogprotected Serializerserprotected java.lang.ClassserClassprotected java.lang.reflect.ConstructorserClassConstructorprotected QNamexmlType
-
Constructor Summary
Constructors Constructor Description BaseSerializerFactory(java.lang.Class serClass)ConstructorBaseSerializerFactory(java.lang.Class serClass, QName xmlType, java.lang.Class javaType)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SerializerFactorycreateFactory(java.lang.Class factory, java.lang.Class javaType, QName xmlType)Utility method that intospects on a factory class to decide how to create the factory.protected SerializergetGeneralPurpose(java.lang.String mechanismType)Obtains a serializer by invoking(javaType, xmlType) on the serClass. protected java.lang.reflect.MethodgetGetSerializer()Returns the getSerializer.java.lang.ClassgetJavaType()get javaTypeprotected java.lang.reflect.ConstructorgetSerClassConstructor()Returns the serClassConstructor.SerializergetSerializerAs(java.lang.String mechanismType)Returns a Serializer for the specified XML processing mechanism type.protected SerializergetSerializerAsInternal(java.lang.String mechanismType)protected SerializergetSpecialized(java.lang.String mechanismType)Obtains a serializer by invoking getSerializer method in the javaType class or its Helper class.java.util.IteratorgetSupportedMechanismTypes()Returns a list of all XML processing mechanism types supported by this SerializerFactory.QNamegetXMLType()get xmlType-
Methods inherited from class org.apache.axis.encoding.ser.BaseFactory
getMethod
-
-
-
-
Field Detail
-
log
protected static org.apache.commons.logging.Log log
-
serClass
protected java.lang.Class serClass
-
xmlType
protected QName xmlType
-
javaType
protected java.lang.Class javaType
-
ser
protected transient Serializer ser
-
serClassConstructor
protected transient java.lang.reflect.Constructor serClassConstructor
-
getSerializer
protected transient java.lang.reflect.Method getSerializer
-
-
Constructor Detail
-
BaseSerializerFactory
public BaseSerializerFactory(java.lang.Class serClass)
Constructor- Parameters:
serClass- is the class of the Serializer Sharing is only valid for xml primitives.
-
BaseSerializerFactory
public BaseSerializerFactory(java.lang.Class serClass, QName xmlType, java.lang.Class javaType)
-
-
Method Detail
-
getSerializerAs
public Serializer getSerializerAs(java.lang.String mechanismType) throws JAXRPCException
Description copied from interface:SerializerFactoryReturns a Serializer for the specified XML processing mechanism type.- Specified by:
getSerializerAsin interfaceSerializerFactory- Parameters:
mechanismType- - XML processing mechanism type [TBD: definition of valid constants]- Returns:
- a
Serializerfor the specified XML processing mechanism type - Throws:
JAXRPCException- ifSerializerFactorydoes not support the specified XML processing mechanism
-
getSerializerAsInternal
protected Serializer getSerializerAsInternal(java.lang.String mechanismType) throws JAXRPCException
- Throws:
JAXRPCException
-
getGeneralPurpose
protected Serializer getGeneralPurpose(java.lang.String mechanismType)
Obtains a serializer by invoking(javaType, xmlType) on the serClass.
-
getSpecialized
protected Serializer getSpecialized(java.lang.String mechanismType)
Obtains a serializer by invoking getSerializer method in the javaType class or its Helper class.
-
getSupportedMechanismTypes
public java.util.Iterator getSupportedMechanismTypes()
Returns a list of all XML processing mechanism types supported by this SerializerFactory.- Specified by:
getSupportedMechanismTypesin interfaceSerializerFactory- Returns:
- List of unique identifiers for the supported XML processing mechanism types
-
getXMLType
public QName getXMLType()
get xmlType- Returns:
- xmlType QName for this factory
-
getJavaType
public java.lang.Class getJavaType()
get javaType- Returns:
- javaType Class for this factory
-
createFactory
public static SerializerFactory createFactory(java.lang.Class factory, java.lang.Class javaType, QName xmlType)
Utility method that intospects on a factory class to decide how to create the factory. Tries in the following order: public static create(Class javaType, QName xmlType) public(Class javaType, QName xmlType) public () - Parameters:
factory- classxmlType-javaType-
-
getGetSerializer
protected java.lang.reflect.Method getGetSerializer()
Returns the getSerializer.- Returns:
- Method
-
getSerClassConstructor
protected java.lang.reflect.Constructor getSerClassConstructor()
Returns the serClassConstructor.- Returns:
- Constructor
-
-