org.apache.xmlrpc.webserver
Class XmlRpcServletServer

java.lang.Object
  extended by org.apache.xmlrpc.common.XmlRpcController
      extended by org.apache.xmlrpc.server.XmlRpcServer
          extended by org.apache.xmlrpc.server.XmlRpcStreamServer
              extended by org.apache.xmlrpc.webserver.XmlRpcServletServer

public class XmlRpcServletServer
extends XmlRpcStreamServer

An extension of XmlRpcServer, which is suitable for processing servlet requests.


Nested Class Summary
protected static class XmlRpcServletServer.RequestData
          This class is used as a "connection" while processing the request.
 
Constructor Summary
XmlRpcServletServer()
           
 
Method Summary
protected  void closeConnection(java.lang.Object pConnection)
          Closes the connection, releasing all resources.
 void execute(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse)
          Processes the servlet request.
protected  XmlRpcServletServer.RequestData getConfig(javax.servlet.http.HttpServletRequest pRequest)
           
protected  java.io.OutputStream getOutputStream(XmlRpcStreamRequestConfig pConfig, java.lang.Object pConnection, int pSize)
          Called to prepare the output stream, if content length is required.
protected  boolean isContentLengthRequired(XmlRpcStreamRequestConfig pConfig)
          Returns, whether the requests content length is required.
protected  XmlRpcServletServer.RequestData newConfig(javax.servlet.http.HttpServletRequest pRequest)
           
protected  java.io.InputStream newInputStream(XmlRpcStreamRequestConfig pConfig, java.lang.Object pConnection)
          Returns the connections input stream.
protected  java.io.OutputStream newOutputStream(XmlRpcStreamRequestConfig pConfig, java.lang.Object pConnection)
          Creates the connections output stream.
protected  XmlRpcServletServer.RequestData newRequestData(javax.servlet.http.HttpServletRequest pRequest)
           
 
Methods inherited from class org.apache.xmlrpc.server.XmlRpcStreamServer
execute, getInputStream, getOutputStream, getRequest, getXmlRpcWriter, getXMLWriterFactory, setXMLWriterFactory, writeError, writeResponse
 
Methods inherited from class org.apache.xmlrpc.server.XmlRpcServer
execute, getConfig, getDefaultXmlRpcWorkerFactory, getHandlerMapping, setConfig, setHandlerMapping
 
Methods inherited from class org.apache.xmlrpc.common.XmlRpcController
getMaxThreads, getTypeFactory, getWorkerFactory, setMaxThreads, setTypeFactory, setWorkerFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlRpcServletServer

public XmlRpcServletServer()
Method Detail

newConfig

protected XmlRpcServletServer.RequestData newConfig(javax.servlet.http.HttpServletRequest pRequest)

getConfig

protected XmlRpcServletServer.RequestData getConfig(javax.servlet.http.HttpServletRequest pRequest)

newRequestData

protected XmlRpcServletServer.RequestData newRequestData(javax.servlet.http.HttpServletRequest pRequest)

execute

public void execute(javax.servlet.http.HttpServletRequest pRequest,
                    javax.servlet.http.HttpServletResponse pResponse)
             throws javax.servlet.ServletException,
                    java.io.IOException
Processes the servlet request.

Parameters:
pRequest - The servlet request being read.
pResponse - The servlet response being created.
Throws:
java.io.IOException - Reading the request or writing the response failed.
javax.servlet.ServletException - Processing the request failed.

isContentLengthRequired

protected boolean isContentLengthRequired(XmlRpcStreamRequestConfig pConfig)
Returns, whether the requests content length is required.

Overrides:
isContentLengthRequired in class XmlRpcStreamServer

newInputStream

protected java.io.InputStream newInputStream(XmlRpcStreamRequestConfig pConfig,
                                             java.lang.Object pConnection)
                                      throws java.io.IOException
Description copied from class: XmlRpcStreamServer
Returns the connections input stream.

Specified by:
newInputStream in class XmlRpcStreamServer
Throws:
java.io.IOException

newOutputStream

protected java.io.OutputStream newOutputStream(XmlRpcStreamRequestConfig pConfig,
                                               java.lang.Object pConnection)
                                        throws java.io.IOException
Description copied from class: XmlRpcStreamServer
Creates the connections output stream.

Specified by:
newOutputStream in class XmlRpcStreamServer
Throws:
java.io.IOException

getOutputStream

protected java.io.OutputStream getOutputStream(XmlRpcStreamRequestConfig pConfig,
                                               java.lang.Object pConnection,
                                               int pSize)
                                        throws java.io.IOException
Description copied from class: XmlRpcStreamServer
Called to prepare the output stream, if content length is required.

Overrides:
getOutputStream in class XmlRpcStreamServer
Throws:
java.io.IOException

closeConnection

protected void closeConnection(java.lang.Object pConnection)
                        throws java.io.IOException
Description copied from class: XmlRpcStreamServer
Closes the connection, releasing all resources.

Specified by:
closeConnection in class XmlRpcStreamServer
Throws:
java.io.IOException


Copyright 2001-2001-2006 Apache Software Foundation. All Rights Reserved.