Class BaseSerializerFactory

java.lang.Object
org.apache.axis.encoding.ser.BaseFactory
org.apache.axis.encoding.ser.BaseSerializerFactory
All Implemented Interfaces:
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 invalid input: '<'scheu@us.ibm.com>
See Also:
  • Field Details

    • log

      protected static org.apache.commons.logging.Log log
    • serClass

      protected Class serClass
    • xmlType

      protected QName xmlType
    • javaType

      protected Class javaType
    • ser

      protected transient Serializer ser
    • serClassConstructor

      protected transient Constructor serClassConstructor
    • getSerializer

      protected transient Method getSerializer
  • 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

    • getSerializerAs

      public Serializer getSerializerAs(String mechanismType) throws JAXRPCException
      Description copied from interface: SerializerFactory
      Returns a Serializer for the specified XML processing mechanism type.
      Specified by:
      getSerializerAs in interface SerializerFactory
      Parameters:
      mechanismType - - XML processing mechanism type [TBD: definition of valid constants]
      Returns:
      a Serializer for the specified XML processing mechanism type
      Throws:
      JAXRPCException - if SerializerFactory does not support the specified XML processing mechanism
    • getSerializerAsInternal

      protected Serializer getSerializerAsInternal(String mechanismType) throws JAXRPCException
      Throws:
      JAXRPCException
    • getGeneralPurpose

      protected Serializer getGeneralPurpose(String mechanismType)
      Obtains a serializer by invoking (javaType, xmlType) on the serClass.
    • 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
    • getJavaType

      public Class getJavaType()
      get javaType
      Returns:
      javaType Class for this factory
    • 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 -
    • getGetSerializer

      protected Method getGetSerializer()
      Returns the getSerializer.
      Returns:
      Method
    • getSerClassConstructor

      protected Constructor getSerClassConstructor()
      Returns the serClassConstructor.
      Returns:
      Constructor