org.apache.xmlrpc.webserver

Class XmlRpcServlet


public class XmlRpcServlet
extends HttpServlet

A default servlet implementation The typical use would be to derive a subclass, which is overwriting at least the method newXmlRpcHandlerMapping().

The servlet accepts the following init parameters:

NameDescription
enabledForExtensionsSets the value XmlRpcConfig.isEnabledForExtensions() to true.

Method Summary

void
doPost(HttpServletRequest pRequest, HttpServletResponse pResponse)
Creates a new instance of RequestData for the request.
AbstractReflectiveHandlerMapping.AuthenticationHandler
getAuthenticationHandler()
Returns the servlets AbstractReflectiveHandlerMapping.AuthenticationHandler.
RequestProcessorFactoryFactory
getRequestProcessorFactoryFactory()
Returns the servlets RequestProcessorFactoryFactory.
TypeConverterFactory
getTypeConverterFactory()
Returns the servlets TypeConverterFactory.
XmlRpcServletServer
getXmlRpcServletServer()
Returns the servlets instance of XmlRpcServletServer.
void
init(ServletConfig pConfig)
void
log(String pMessage)
void
log(String pMessage, Throwable pThrowable)
protected PropertyHandlerMapping
newPropertyHandlerMapping(URL url)
Creates a new instance of PropertyHandlerMapping by loading the property file from the given URL.
protected XmlRpcHandlerMapping
newXmlRpcHandlerMapping()
Creates a new handler mapping.
protected XmlRpcServletServer
newXmlRpcServer(ServletConfig pConfig)
Creates a new instance of XmlRpcServer, which is being used to process the requests.
void
setAuthenticationHandler(AbstractReflectiveHandlerMapping.AuthenticationHandler pHandler)
Sets the servlets AbstractReflectiveHandlerMapping.AuthenticationHandler.
void
setRequestProcessorFactoryFactory(RequestProcessorFactoryFactory pFactory)
Sets the servlets RequestProcessorFactoryFactory.
void
setTypeConverterFactory(TypeConverterFactory pFactory)
Sets the servlets TypeConverterFactory.

Method Details

doPost

public void doPost(HttpServletRequest pRequest,
                   HttpServletResponse pResponse)
            throws IOException,
                   ServletException

getAuthenticationHandler

public AbstractReflectiveHandlerMapping.AuthenticationHandler getAuthenticationHandler()

getRequestProcessorFactoryFactory

public RequestProcessorFactoryFactory getRequestProcessorFactoryFactory()
Returns the servlets RequestProcessorFactoryFactory.

getTypeConverterFactory

public TypeConverterFactory getTypeConverterFactory()
Returns the servlets TypeConverterFactory.

getXmlRpcServletServer

public XmlRpcServletServer getXmlRpcServletServer()
Returns the servlets instance of XmlRpcServletServer.
Returns:
The configurable instance of XmlRpcServletServer.

init

public void init(ServletConfig pConfig)
            throws ServletException

log

public void log(String pMessage)

log

public void log(String pMessage,
                Throwable pThrowable)

newPropertyHandlerMapping

protected PropertyHandlerMapping newPropertyHandlerMapping(URL url)
            throws IOException,
                   XmlRpcException
Creates a new instance of PropertyHandlerMapping by loading the property file from the given URL. Called from newXmlRpcHandlerMapping().

newXmlRpcHandlerMapping

protected XmlRpcHandlerMapping newXmlRpcHandlerMapping()
            throws XmlRpcException
Creates a new handler mapping. The default implementation loads a property file from the resource org/apache/xmlrpc/webserver/XmlRpcServlet.properties

newXmlRpcServer

protected XmlRpcServletServer newXmlRpcServer(ServletConfig pConfig)
            throws XmlRpcException
Creates a new instance of XmlRpcServer, which is being used to process the requests. The default implementation will simply invoke new XmlRpcServer.

setAuthenticationHandler

public void setAuthenticationHandler(AbstractReflectiveHandlerMapping.AuthenticationHandler pHandler)

setRequestProcessorFactoryFactory

public void setRequestProcessorFactoryFactory(RequestProcessorFactoryFactory pFactory)
Sets the servlets RequestProcessorFactoryFactory.

setTypeConverterFactory

public void setTypeConverterFactory(TypeConverterFactory pFactory)
Sets the servlets TypeConverterFactory.

Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.