org.apache.axis.encoding.ser

Class BaseSerializerFactory

Implemented Interfaces:
java.io.Serializable, SerializerFactory, SerializerFactory
Known Direct 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

Field Summary

protected Method
getSerializer
protected Class
javaType
protected static Log
log
protected Serializer
ser
protected Class
serClass
protected Constructor
serClassConstructor
protected QName
xmlType

Constructor Summary

BaseSerializerFactory(Class serClass)
Constructor
BaseSerializerFactory(Class serClass, QName xmlType, Class javaType)

Method Summary

static SerializerFactory
createFactory(Class factory, Class javaType, QName xmlType)
Utility method that intospects on a factory class to decide how to create the factory.
protected Serializer
getGeneralPurpose(String mechanismType)
Obtains a serializer by invoking (javaType, xmlType) on the serClass.
protected Method
getGetSerializer()
Returns the getSerializer.
Class
getJavaType()
get javaType
protected Constructor
getSerClassConstructor()
Returns the serClassConstructor.
Serializer
getSerializerAs(String mechanismType)
protected Serializer
getSerializerAsInternal(String mechanismType)
protected Serializer
getSpecialized(String mechanismType)
Obtains a serializer by invoking getSerializer method in the javaType class or its Helper class.
Iterator
getSupportedMechanismTypes()
Returns a list of all XML processing mechanism types supported by this SerializerFactory.
QName
getXMLType()
get xmlType

Methods inherited from class org.apache.axis.encoding.ser.BaseFactory

getMethod

Field Details

getSerializer

protected Method getSerializer


javaType

protected Class javaType


log

protected static Log log


ser

protected Serializer ser


serClass

protected Class serClass


serClassConstructor

protected Constructor serClassConstructor


xmlType

protected QName xmlType

Constructor Details

BaseSerializerFactory

public BaseSerializerFactory(Class serClass)
Constructor

Parameters:
serClass - is the class of the Serializer Sharing is only valid for xml primitives.


BaseSerializerFactory

public BaseSerializerFactory(Class serClass,
                             QName xmlType,
                             Class javaType)

Method Details

createFactory

public static SerializerFactory createFactory(Class factory,
                                              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 - class
javaType -
xmlType -


getGeneralPurpose

protected Serializer getGeneralPurpose(String mechanismType)
Obtains a serializer by invoking (javaType, xmlType) on the serClass.


getGetSerializer

protected Method getGetSerializer()
Returns the getSerializer.

Returns:
Method


getJavaType

public Class getJavaType()
get javaType

Returns:
javaType Class for this factory


getSerClassConstructor

protected Constructor getSerClassConstructor()
Returns the serClassConstructor.

Returns:
Constructor


getSerializerAs

public Serializer getSerializerAs(String mechanismType)
            throws JAXRPCException
Specified by:
getSerializerAs in interface SerializerFactory


getSerializerAsInternal

protected Serializer getSerializerAsInternal(String mechanismType)
            throws JAXRPCException


getSpecialized

protected Serializer getSpecialized(String mechanismType)
Obtains a serializer by invoking getSerializer method in the javaType class or its Helper class.


getSupportedMechanismTypes

public Iterator getSupportedMechanismTypes()
Returns a list of all XML processing mechanism types supported by this SerializerFactory.
Specified by:
getSupportedMechanismTypes in interface SerializerFactory

Returns:
List of unique identifiers for the supported XML processing mechanism types


getXMLType

public QName getXMLType()
get xmlType

Returns:
xmlType QName for this factory


Copyright B) 2005 Apache Web Services Project. All Rights Reserved.