helma.xmlrpc
Class XmlRpc

java.lang.Object
  |
  +--org.xml.sax.HandlerBase
        |
        +--helma.xmlrpc.XmlRpc
All Implemented Interfaces:
org.xml.sax.DocumentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public abstract class XmlRpc
extends org.xml.sax.HandlerBase

This abstract base class provides basic capabilities for XML-RPC, like parsing of parameters or encoding Java objects into XML-RPC format. Any XML parser with a SAX interface can be used.

XmlRpcServer and XmlRpcClient are the classes that actually implement an XML-RCP server and client.

See Also:
XmlRpcServer, XmlRpcClient

Field Summary
static boolean debug
           
static java.lang.String version
           
 
Constructor Summary
XmlRpc()
           
 
Method Summary
 void characters(char[] ch, int start, int length)
          Method called by SAX driver.
 void endElement(java.lang.String name)
          Method called by SAX driver.
 void error(org.xml.sax.SAXParseException e)
           
 void fatalError(org.xml.sax.SAXParseException e)
           
static boolean getKeepAlive()
          get current HTTP keepalive mode.
static void setDebug(boolean val)
          Switch debugging output on/off.
static void setDriver(java.lang.Class driver)
          Set the SAX Parser to be used by directly passing the Class object.
static void setDriver(java.lang.String driver)
          Set the SAX Parser to be used.
static void setEncoding(java.lang.String enc)
          Set the encoding of the XML.
static void setKeepAlive(boolean val)
          Switch HTTP keepalive on/off.
 void startElement(java.lang.String name, org.xml.sax.AttributeList atts)
          Method called by SAX driver.
 
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

version

public static final java.lang.String version

debug

public static boolean debug
Constructor Detail

XmlRpc

public XmlRpc()
Method Detail

setDriver

public static void setDriver(java.lang.String driver)
                      throws java.lang.ClassNotFoundException
Set the SAX Parser to be used. The argument can either be the full class name or a user friendly shortcut if the parser is known to this class. The parsers that can currently be set by shortcut are listed in the main documentation page. If you are using another parser please send me the name of the SAX driver and I'll include it in a future release. If setDriver() is never called then the System property "sax.driver" is consulted. If that is not defined the driver defaults to OpenXML.

setDriver

public static void setDriver(java.lang.Class driver)
Set the SAX Parser to be used by directly passing the Class object.

setEncoding

public static void setEncoding(java.lang.String enc)
Set the encoding of the XML. This should be the name of a Java encoding contained in the encodings Hashtable.

setDebug

public static void setDebug(boolean val)
Switch debugging output on/off.

setKeepAlive

public static void setKeepAlive(boolean val)
Switch HTTP keepalive on/off.

getKeepAlive

public static boolean getKeepAlive()
get current HTTP keepalive mode.

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
Method called by SAX driver.
Overrides:
characters in class org.xml.sax.HandlerBase

endElement

public void endElement(java.lang.String name)
                throws org.xml.sax.SAXException
Method called by SAX driver.
Overrides:
endElement in class org.xml.sax.HandlerBase

startElement

public void startElement(java.lang.String name,
                         org.xml.sax.AttributeList atts)
                  throws org.xml.sax.SAXException
Method called by SAX driver.
Overrides:
startElement in class org.xml.sax.HandlerBase

error

public void error(org.xml.sax.SAXParseException e)
           throws org.xml.sax.SAXException
Overrides:
error in class org.xml.sax.HandlerBase

fatalError

public void fatalError(org.xml.sax.SAXParseException e)
                throws org.xml.sax.SAXException
Overrides:
fatalError in class org.xml.sax.HandlerBase