org.apache.xmlrpc.jaxb

Class JaxbParser

Implemented Interfaces:
ContentHandler, TypeParser

public class JaxbParser
extends ExtParser

A parser for JAXB objects.

Constructor Summary

JaxbParser(JAXBContext pContext)
Creates a new instance with the given context.

Method Summary

protected ContentHandler
getExtHandler()
Returns a content handler for parsing the actual contents.
Object
getResult()
Returns the parsed object.
protected String
getTagName()
Returns the outer node name.

Methods inherited from class org.apache.xmlrpc.parser.ExtParser

characters, endDocument, endElement, endPrefixMapping, getExtHandler, getTagName, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping

Constructor Details

JaxbParser

public JaxbParser(JAXBContext pContext)
Creates a new instance with the given context.
Parameters:
pContext - The context being used for creating unmarshallers.

Method Details

getExtHandler

protected ContentHandler getExtHandler()
            throws SAXException
Returns a content handler for parsing the actual contents.
Overrides:
getExtHandler in interface ExtParser
Returns:
A SAX handler for parsing the XML inside the outer ex:foo element.

getResult

public Object getResult()
            throws XmlRpcException
Returns the parsed object.
Specified by:
getResult in interface TypeParser
Returns:
The parameter or result object.
Throws:
XmlRpcException - Creating the result object failed.

getTagName

protected String getTagName()
Returns the outer node name.
Overrides:
getTagName in interface ExtParser

Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.