org.apache.xmlrpc.webserver
Class XmlRpcServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.apache.xmlrpc.webserver.XmlRpcServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class XmlRpcServlet
extends javax.servlet.http.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.

See Also:
Serialized Form

Constructor Summary
XmlRpcServlet()
           
 
Method Summary
 void doPost(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.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(javax.servlet.ServletConfig pConfig)
           
 void log(java.lang.String pMessage)
           
 void log(java.lang.String pMessage, java.lang.Throwable pThrowable)
           
protected  PropertyHandlerMapping newPropertyHandlerMapping(java.net.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(javax.servlet.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.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlRpcServlet

public XmlRpcServlet()
Method Detail

getXmlRpcServletServer

public XmlRpcServletServer getXmlRpcServletServer()
Returns the servlets instance of XmlRpcServletServer.

Returns:
The configurable instance of XmlRpcServletServer.

init

public void init(javax.servlet.ServletConfig pConfig)
          throws javax.servlet.ServletException
Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

setAuthenticationHandler

public void setAuthenticationHandler(AbstractReflectiveHandlerMapping.AuthenticationHandler pHandler)
Sets the servlets AbstractReflectiveHandlerMapping.AuthenticationHandler.


getAuthenticationHandler

public AbstractReflectiveHandlerMapping.AuthenticationHandler getAuthenticationHandler()
Returns the servlets AbstractReflectiveHandlerMapping.AuthenticationHandler.


setRequestProcessorFactoryFactory

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


getRequestProcessorFactoryFactory

public RequestProcessorFactoryFactory getRequestProcessorFactoryFactory()
Returns the servlets RequestProcessorFactoryFactory.


setTypeConverterFactory

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


getTypeConverterFactory

public TypeConverterFactory getTypeConverterFactory()
Returns the servlets TypeConverterFactory.


newXmlRpcServer

protected XmlRpcServletServer newXmlRpcServer(javax.servlet.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.

Parameters:
pConfig - The servlets configuration.
Throws:
XmlRpcException

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

Throws:
XmlRpcException

newPropertyHandlerMapping

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

Throws:
java.io.IOException
XmlRpcException

doPost

public void doPost(javax.servlet.http.HttpServletRequest pRequest,
                   javax.servlet.http.HttpServletResponse pResponse)
            throws java.io.IOException,
                   javax.servlet.ServletException
Creates a new instance of RequestData for the request.

Overrides:
doPost in class javax.servlet.http.HttpServlet
Throws:
java.io.IOException
javax.servlet.ServletException

log

public void log(java.lang.String pMessage,
                java.lang.Throwable pThrowable)
Overrides:
log in class javax.servlet.GenericServlet

log

public void log(java.lang.String pMessage)
Overrides:
log in class javax.servlet.GenericServlet


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