Package org.apache.xmlrpc.jaxb
Class JaxbTypeFactory
java.lang.Object
org.apache.xmlrpc.common.TypeFactoryImpl
org.apache.xmlrpc.jaxb.JaxbTypeFactory
- All Implemented Interfaces:
TypeFactory
A type factory with support for JAXB objects.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final javax.xml.bind.JAXBContextprivate final JaxbSerializer -
Constructor Summary
ConstructorsConstructorDescriptionJaxbTypeFactory(XmlRpcController pController, javax.xml.bind.JAXBContext pContext) Creates a new instance with the given controller and JAXB context. -
Method Summary
Modifier and TypeMethodDescriptiongetParser(XmlRpcStreamConfig pConfig, org.apache.ws.commons.util.NamespaceContextImpl pContext, String pURI, String pLocalName) Creates a parser for a parameter or result object.getSerializer(XmlRpcStreamConfig pConfig, Object pObject) Creates a serializer for the objectpObject.Methods inherited from class org.apache.xmlrpc.common.TypeFactoryImpl
getController
-
Field Details
-
context
private final javax.xml.bind.JAXBContext context -
serializer
-
-
Constructor Details
-
JaxbTypeFactory
Creates a new instance with the given controller and JAXB context.- Parameters:
pController- The controller, which will invoke the factory.pContext- The context being used to create marshallers and unmarshallers.
-
-
Method Details
-
getParser
public TypeParser getParser(XmlRpcStreamConfig pConfig, org.apache.ws.commons.util.NamespaceContextImpl pContext, String pURI, String pLocalName) Description copied from interface:TypeFactoryCreates a parser for a parameter or result object.- Specified by:
getParserin interfaceTypeFactory- Overrides:
getParserin classTypeFactoryImpl- 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.
-
getSerializer
Description copied from interface:TypeFactoryCreates a serializer for the objectpObject.- Specified by:
getSerializerin interfaceTypeFactory- Overrides:
getSerializerin classTypeFactoryImpl- Parameters:
pConfig- The request configuration.pObject- The object being serialized.- Returns:
- A serializer for
pObject. - Throws:
SAXException- Creating the serializer failed.
-