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:
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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.apache.commons.logging.Log
private RequestProcessorFactoryFactory
private static final long
private XmlRpcServletServer
private TypeConverterFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
doPost
(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse) Creates a new instance ofRequestData
for the request.Returns the servletsAbstractReflectiveHandlerMapping.AuthenticationHandler
.Returns the servletsRequestProcessorFactoryFactory
.Returns the servletsTypeConverterFactory
.Returns the servlets instance ofXmlRpcServletServer
.private void
handleInitParameters
(javax.servlet.ServletConfig pConfig) void
init
(javax.servlet.ServletConfig pConfig) void
void
protected PropertyHandlerMapping
Creates a new instance ofPropertyHandlerMapping
by loading the property file from the given URL.protected XmlRpcHandlerMapping
Creates a new handler mapping.protected XmlRpcServletServer
newXmlRpcServer
(javax.servlet.ServletConfig pConfig) Creates a new instance ofXmlRpcServer
, which is being used to process the requests.void
Sets the servletsAbstractReflectiveHandlerMapping.AuthenticationHandler
.void
Sets the servletsRequestProcessorFactoryFactory
.void
setTypeConverterFactory
(TypeConverterFactory pFactory) Sets the servletsTypeConverterFactory
.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
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
log
private static final org.apache.commons.logging.Log log -
server
-
authenticationHandler
-
requestProcessorFactoryFactory
-
typeConverterFactory
-
-
Constructor Details
-
XmlRpcServlet
public XmlRpcServlet()
-
-
Method Details
-
getXmlRpcServletServer
Returns the servlets instance ofXmlRpcServletServer
.- Returns:
- The configurable instance of
XmlRpcServletServer
.
-
handleInitParameters
private void handleInitParameters(javax.servlet.ServletConfig pConfig) throws javax.servlet.ServletException - Throws:
javax.servlet.ServletException
-
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
Returns the servletsAbstractReflectiveHandlerMapping.AuthenticationHandler
. -
setRequestProcessorFactoryFactory
Sets the servletsRequestProcessorFactoryFactory
. -
getRequestProcessorFactoryFactory
Returns the servletsRequestProcessorFactoryFactory
. -
setTypeConverterFactory
Sets the servletsTypeConverterFactory
. -
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
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(URL url) throws IOException, XmlRpcException Creates a new instance ofPropertyHandlerMapping
by loading the property file from the given URL. Called fromnewXmlRpcHandlerMapping()
.- Throws:
IOException
XmlRpcException
-
doPost
public void doPost(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse) throws IOException, javax.servlet.ServletException Creates a new instance ofRequestData
for the request.- Overrides:
doPost
in classjavax.servlet.http.HttpServlet
- Throws:
IOException
javax.servlet.ServletException
-
log
- Overrides:
log
in classjavax.servlet.GenericServlet
-
log
- Overrides:
log
in classjavax.servlet.GenericServlet
-