Package org.apache.xmlrpc.webserver
Class XmlRpcServletServer
- java.lang.Object
-
- org.apache.xmlrpc.common.XmlRpcController
-
- org.apache.xmlrpc.server.XmlRpcServer
-
- org.apache.xmlrpc.server.XmlRpcStreamServer
-
- org.apache.xmlrpc.server.XmlRpcHttpServer
-
- org.apache.xmlrpc.webserver.XmlRpcServletServer
-
- All Implemented Interfaces:
XmlRpcRequestProcessor
,XmlRpcStreamRequestProcessor
public class XmlRpcServletServer extends XmlRpcHttpServer
An extension ofXmlRpcServer
, which is suitable for processing servlet requests.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
XmlRpcServletServer.ServletStreamConnection
-
Constructor Summary
Constructors Constructor Description XmlRpcServletServer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
-
-
-
-
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 classXmlRpcStreamServer
- 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 classXmlRpcStreamServer
- 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 classXmlRpcHttpServer
-
-