Package org.apache.xmlrpc.common
Class TypeFactoryImpl
- java.lang.Object
-
- org.apache.xmlrpc.common.TypeFactoryImpl
-
- All Implemented Interfaces:
TypeFactory
- Direct Known Subclasses:
JaxbTypeFactory
public class TypeFactoryImpl extends java.lang.Object implements TypeFactory
Default implementation of a type factory.
-
-
Field Summary
Fields Modifier and Type Field Description private static TypeSerializerBIGDECIMAL_SERIALIZERprivate static TypeSerializerBIGINTEGER_SERIALIZERprivate static TypeSerializerBOOLEAN_SERIALIZERprivate static TypeSerializerBYTE_SERIALIZERprivate static TypeSerializerCALENDAR_SERIALIZERprivate XmlRpcControllercontrollerprivate DateSerializerdateSerializerprivate static TypeSerializerDOUBLE_SERIALIZERprivate static TypeSerializerFLOAT_SERIALIZERprivate static TypeSerializerI4_SERIALIZERprivate static TypeSerializerLONG_SERIALIZERprivate static TypeSerializerNODE_SERIALIZERprivate static TypeSerializerNULL_SERIALIZERprivate static TypeSerializerSERIALIZABLE_SERIALIZERprivate static TypeSerializerSHORT_SERIALIZERprivate static TypeSerializerSTRING_SERIALIZER
-
Constructor Summary
Constructors Constructor Description TypeFactoryImpl(XmlRpcController pController)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description XmlRpcControllergetController()Returns the controller, which operates the type factory.TypeParsergetParser(XmlRpcStreamConfig pConfig, org.apache.ws.commons.util.NamespaceContextImpl pContext, java.lang.String pURI, java.lang.String pLocalName)Creates a parser for a parameter or result object.TypeSerializergetSerializer(XmlRpcStreamConfig pConfig, java.lang.Object pObject)Creates a serializer for the objectpObject.
-
-
-
Field Detail
-
NULL_SERIALIZER
private static final TypeSerializer NULL_SERIALIZER
-
STRING_SERIALIZER
private static final TypeSerializer STRING_SERIALIZER
-
I4_SERIALIZER
private static final TypeSerializer I4_SERIALIZER
-
BOOLEAN_SERIALIZER
private static final TypeSerializer BOOLEAN_SERIALIZER
-
DOUBLE_SERIALIZER
private static final TypeSerializer DOUBLE_SERIALIZER
-
BYTE_SERIALIZER
private static final TypeSerializer BYTE_SERIALIZER
-
SHORT_SERIALIZER
private static final TypeSerializer SHORT_SERIALIZER
-
LONG_SERIALIZER
private static final TypeSerializer LONG_SERIALIZER
-
FLOAT_SERIALIZER
private static final TypeSerializer FLOAT_SERIALIZER
-
NODE_SERIALIZER
private static final TypeSerializer NODE_SERIALIZER
-
SERIALIZABLE_SERIALIZER
private static final TypeSerializer SERIALIZABLE_SERIALIZER
-
BIGDECIMAL_SERIALIZER
private static final TypeSerializer BIGDECIMAL_SERIALIZER
-
BIGINTEGER_SERIALIZER
private static final TypeSerializer BIGINTEGER_SERIALIZER
-
CALENDAR_SERIALIZER
private static final TypeSerializer CALENDAR_SERIALIZER
-
controller
private final XmlRpcController controller
-
dateSerializer
private DateSerializer dateSerializer
-
-
Constructor Detail
-
TypeFactoryImpl
public TypeFactoryImpl(XmlRpcController pController)
Creates a new instance.- Parameters:
pController- The controller, which operates the type factory.
-
-
Method Detail
-
getController
public XmlRpcController getController()
Returns the controller, which operates the type factory.- Returns:
- The controller, an instance of
XmlRpcClient, orXmlRpcServer.
-
getSerializer
public TypeSerializer getSerializer(XmlRpcStreamConfig pConfig, java.lang.Object pObject) throws org.xml.sax.SAXException
Description copied from interface:TypeFactoryCreates a serializer for the objectpObject.- Specified by:
getSerializerin interfaceTypeFactory- Parameters:
pConfig- The request configuration.pObject- The object being serialized.- Returns:
- A serializer for
pObject. - Throws:
org.xml.sax.SAXException- Creating the serializer failed.
-
getParser
public TypeParser getParser(XmlRpcStreamConfig pConfig, org.apache.ws.commons.util.NamespaceContextImpl pContext, java.lang.String pURI, java.lang.String pLocalName)
Description copied from interface:TypeFactoryCreates a parser for a parameter or result object.- Specified by:
getParserin interfaceTypeFactory- Parameters:
pConfig- The request configuration.pContext- A namespace context, for looking up prefix mappings.pURI- The namespace URI of the element containing the parameter or result.pLocalName- The local name of the element containing the parameter or result.- Returns:
- The created parser.
-
-