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.server.XmlRpcHttpServer
                  extended by org.apache.xmlrpc.webserver.XmlRpcServletServer
All Implemented Interfaces:
XmlRpcRequestProcessor, XmlRpcStreamRequestProcessor

public class XmlRpcServletServer
extends XmlRpcHttpServer

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


Nested Class Summary
protected static class XmlRpcServletServer.ServletStreamConnection
           
 
Constructor Summary
XmlRpcServletServer()
           
 
Method Summary
 void execute(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse)
          Processes the servlet request.
protected  XmlRpcHttpRequestConfigImpl getConfig(javax.servlet.http.HttpServletRequest pRequest)
           
protected  java.io.OutputStream getOutputStream(XmlRpcStreamRequestConfig pConfig, ServerStreamConnection 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  XmlRpcHttpRequestConfigImpl newConfig(javax.servlet.http.HttpServletRequest pRequest)
           
protected  XmlRpcServletServer.ServletStreamConnection newStreamConnection(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse)
           
protected  void setResponseHeader(ServerStreamConnection pConnection, java.lang.String pHeader, java.lang.String pValue)
           
 
Methods inherited from class org.apache.xmlrpc.server.XmlRpcHttpServer
getOutputStream
 
Methods inherited from class org.apache.xmlrpc.server.XmlRpcStreamServer
convertThrowable, execute, getErrorLogger, getInputStream, getRequest, getXmlRpcWriter, getXMLWriterFactory, logError, setErrorLogger, setXMLWriterFactory, writeError, writeResponse
 
Methods inherited from class org.apache.xmlrpc.server.XmlRpcServer
execute, getConfig, getDefaultXmlRpcWorkerFactory, getHandlerMapping, getTypeConverterFactory, setConfig, setHandlerMapping, setTypeConverterFactory
 
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
 
Methods inherited from interface org.apache.xmlrpc.common.XmlRpcRequestProcessor
execute, getTypeConverterFactory
 

Constructor Detail

XmlRpcServletServer

public XmlRpcServletServer()
Method Detail

newConfig

protected XmlRpcHttpRequestConfigImpl newConfig(javax.servlet.http.HttpServletRequest pRequest)
Parameters:
pRequest - The request object.

getConfig

protected XmlRpcHttpRequestConfigImpl getConfig(javax.servlet.http.HttpServletRequest pRequest)

newStreamConnection

protected XmlRpcServletServer.ServletStreamConnection newStreamConnection(javax.servlet.http.HttpServletRequest pRequest,
                                                                          javax.servlet.http.HttpServletResponse pResponse)

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
Parameters:
pConfig - The configuration object.

getOutputStream

protected java.io.OutputStream getOutputStream(XmlRpcStreamRequestConfig pConfig,
                                               ServerStreamConnection 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
Parameters:
pConfig - The configuration object.
pSize - The requests size.
Throws:
java.io.IOException

setResponseHeader

protected void setResponseHeader(ServerStreamConnection pConnection,
                                 java.lang.String pHeader,
                                 java.lang.String pValue)
Specified by:
setResponseHeader in class XmlRpcHttpServer


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.