Package org.apache.xmlrpc.webserver
Class XmlRpcServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- 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:
Name Description enabledForExtensions Sets the value XmlRpcConfig.isEnabledForExtensions()
to true.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XmlRpcServlet()
-
Method Summary
-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
-
-
-
-
Method Detail
-
getXmlRpcServletServer
public XmlRpcServletServer getXmlRpcServletServer()
Returns the servlets instance ofXmlRpcServletServer
.- Returns:
- The configurable instance of
XmlRpcServletServer
.
-
init
public void init(javax.servlet.ServletConfig pConfig) throws javax.servlet.ServletException
- Specified by:
init
in interfacejavax.servlet.Servlet
- Overrides:
init
in classjavax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
-
setAuthenticationHandler
public void setAuthenticationHandler(AbstractReflectiveHandlerMapping.AuthenticationHandler pHandler)
Sets the servletsAbstractReflectiveHandlerMapping.AuthenticationHandler
.
-
getAuthenticationHandler
public AbstractReflectiveHandlerMapping.AuthenticationHandler getAuthenticationHandler()
Returns the servletsAbstractReflectiveHandlerMapping.AuthenticationHandler
.
-
setRequestProcessorFactoryFactory
public void setRequestProcessorFactoryFactory(RequestProcessorFactoryFactory pFactory)
Sets the servletsRequestProcessorFactoryFactory
.
-
getRequestProcessorFactoryFactory
public RequestProcessorFactoryFactory getRequestProcessorFactoryFactory()
Returns the servletsRequestProcessorFactoryFactory
.
-
setTypeConverterFactory
public void setTypeConverterFactory(TypeConverterFactory pFactory)
Sets the servletsTypeConverterFactory
.
-
getTypeConverterFactory
public TypeConverterFactory getTypeConverterFactory()
Returns the servletsTypeConverterFactory
.
-
newXmlRpcServer
protected XmlRpcServletServer newXmlRpcServer(javax.servlet.ServletConfig pConfig) throws XmlRpcException
Creates a new instance ofXmlRpcServer
, which is being used to process the requests. The default implementation will simply invokenew
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 resourceorg/apache/xmlrpc/webserver/XmlRpcServlet.properties
- Throws:
XmlRpcException
-
newPropertyHandlerMapping
protected PropertyHandlerMapping newPropertyHandlerMapping(java.net.URL url) throws java.io.IOException, XmlRpcException
Creates a new instance ofPropertyHandlerMapping
by loading the property file from the given URL. Called fromnewXmlRpcHandlerMapping()
.- 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 ofRequestData
for the request.- Overrides:
doPost
in classjavax.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 classjavax.servlet.GenericServlet
-
log
public void log(java.lang.String pMessage)
- Overrides:
log
in classjavax.servlet.GenericServlet
-
-