|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xml.sax.HandlerBase org.apache.xmlrpc.XmlRpc org.apache.xmlrpc.XmlRpcClientResponseProcessor
public class XmlRpcClientResponseProcessor
Process an XML-RPC server response from a byte array or an InputStream into an Object. Optionally throw the result object if it is an exception.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.xmlrpc.XmlRpc |
---|
XmlRpc.Value |
Field Summary | |
---|---|
protected boolean |
fault
Set to true if a fault occured on the server. |
protected java.lang.Object |
result
The result of the XML-RPC operation. |
Fields inherited from class org.apache.xmlrpc.XmlRpc |
---|
ARRAY, BASE64, BOOLEAN, cdata, currentValue, DATE, debug, defaultInputEncoding, DOUBLE, encoding, errorLevel, errorMsg, FATAL, INTEGER, keepalive, methodName, NONE, readCdata, RECOVERABLE, STRING, STRUCT, types, tz, values, version |
Constructor Summary | |
---|---|
XmlRpcClientResponseProcessor(java.util.TimeZone tz)
Creates a new instance. |
Method Summary | |
---|---|
protected boolean |
canReUse()
Called by the worker management framework to see if this worker can be re-used. |
protected XmlRpcException |
decodeException(java.lang.Object result)
Decode an exception from the result returned from the remote server. |
java.lang.Object |
decodeResponse(java.io.InputStream is)
Decode an XML-RPC response from the specified InputStream. |
protected void |
objectParsed(java.lang.Object what)
This method is called when a root level object has been parsed. |
void |
startElement(java.lang.String name,
AttributeList atts)
Overrides method in XmlRpc to handle fault repsonses. |
Methods inherited from class org.apache.xmlrpc.XmlRpc |
---|
characters, endElement, error, fatalError, getDefaultInputEncoding, getEncoding, getInputEncoding, getKeepAlive, getMaxThreads, getServerTimeZone, parse, setDebug, setDefaultInputEncoding, setDriver, setDriver, setEncoding, setInputEncoding, setKeepAlive, setMaxThreads, setServerTimeZone |
Methods inherited from class org.xml.sax.HandlerBase |
---|
endDocument, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, startDocument, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.Object result
protected boolean fault
Constructor Detail |
---|
public XmlRpcClientResponseProcessor(java.util.TimeZone tz)
Method Detail |
---|
public java.lang.Object decodeResponse(java.io.InputStream is) throws XmlRpcClientException
is
- The stream from which to read the response.
XmlRpcClientException
protected XmlRpcException decodeException(java.lang.Object result) throws XmlRpcClientException
result
- The response from the remote XML-RPC server.
XmlRpcClientException
- if the result could not be processed.protected void objectParsed(java.lang.Object what)
XmlRpc
objectParsed
in class XmlRpc
public void startElement(java.lang.String name, AttributeList atts) throws SAXException
startElement
in interface DocumentHandler
startElement
in class XmlRpc
name
- The element type name.atts
- The specified or defaulted attributes.
SAXException
- Any SAX exception, possibly
wrapping another exception.DocumentHandler.startElement(java.lang.String, org.xml.sax.AttributeList)
protected boolean canReUse()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |