org.apache.xmlrpc.common
Class TypeFactoryImpl

java.lang.Object
  extended by 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.


Constructor Summary
TypeFactoryImpl(XmlRpcController pController)
          Creates a new instance.
 
Method Summary
 XmlRpcController getController()
          Returns the controller, which operates the type factory.
 TypeParser getParser(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.
 TypeSerializer getSerializer(XmlRpcStreamConfig pConfig, java.lang.Object pObject)
          Creates a serializer for the object pObject.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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, or XmlRpcServer.

getSerializer

public TypeSerializer getSerializer(XmlRpcStreamConfig pConfig,
                                    java.lang.Object pObject)
                             throws org.xml.sax.SAXException
Description copied from interface: TypeFactory
Creates a serializer for the object pObject.

Specified by:
getSerializer in interface TypeFactory
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: TypeFactory
Creates a parser for a parameter or result object.

Specified by:
getParser in interface TypeFactory
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.


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.