com.oreilly.xml
Class XmlRpcConfiguration

java.lang.Object
  |
  +--com.oreilly.xml.XmlRpcConfiguration

public class XmlRpcConfiguration
extends java.lang.Object

XmlRpcConfiguration is a utility class that will load configuration information for XML-RPC servers and clients to use.

Version:
1.0
Author:
Brett McLaughlin

Constructor Summary
XmlRpcConfiguration(java.io.InputStream in)
           This will set a filename to read configuration information from.
XmlRpcConfiguration(java.lang.String filename)
           This will set a filename to read configuration information from.
 
Method Summary
 java.lang.String getDriverClass()
           This returns the SAX driver class to load.
 java.util.Hashtable getHandlers()
           This returns the handlers the server should register.
 java.lang.String getHostname()
           This returns the hostname the server listens on.
 int getPortNumber()
           This returns the port number the server listens on.
 void saveConfiguration(java.io.OutputStream out)
           This will save the current state out to the specified OutputStream.
 void saveConfiguration(java.lang.String filename)
           This will save the current state out to the XML-RPC configuration file.
 void setDriverClass(java.lang.String driverClass)
           This will set the driver class for parsing.
 void setHandlers(java.util.Hashtable handlers)
           This will set the handlers to register.
 void setHostname(java.lang.String hostname)
           This will set the hostname for the server to listen to.
 void setPortNumber(int portNumber)
           This will set the port number to listen to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlRpcConfiguration

public XmlRpcConfiguration(java.lang.String filename)
                    throws java.io.IOException

This will set a filename to read configuration information from.

Parameters:
filename - String name of XML configuration file.

XmlRpcConfiguration

public XmlRpcConfiguration(java.io.InputStream in)
                    throws java.io.IOException

This will set a filename to read configuration information from.

Parameters:
in - InputStream to read configuration information from.
Method Detail

getPortNumber

public int getPortNumber()

This returns the port number the server listens on.

Returns:
int number of server port.

setPortNumber

public void setPortNumber(int portNumber)

This will set the port number to listen to.

Parameters:
portNumber - int port to listen to.

getHostname

public java.lang.String getHostname()

This returns the hostname the server listens on.

Returns:
String hostname of server.

setHostname

public void setHostname(java.lang.String hostname)

This will set the hostname for the server to listen to.

Parameters:
hostname - String name of server's host.

getDriverClass

public java.lang.String getDriverClass()

This returns the SAX driver class to load.

Returns:
String - name of SAX driver class.

setDriverClass

public void setDriverClass(java.lang.String driverClass)

This will set the driver class for parsing.

Parameters:
driverClass - String name of parser class.

getHandlers

public java.util.Hashtable getHandlers()

This returns the handlers the server should register.

Returns:
Hashtable of handlers.

setHandlers

public void setHandlers(java.util.Hashtable handlers)

This will set the handlers to register.

Parameters:
handlers - Hashtable of handler to register.

saveConfiguration

public void saveConfiguration(java.lang.String filename)
                       throws java.io.IOException

This will save the current state out to the XML-RPC configuration file.

Throws:
IOException - - when errors occur in saving.

saveConfiguration

public void saveConfiguration(java.io.OutputStream out)
                       throws java.io.IOException

This will save the current state out to the specified OutputStream.

Throws:
IOException - - when errors occur in saving.