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.HttpServletA 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
-
-
Field Summary
Fields Modifier and Type Field Description private AbstractReflectiveHandlerMapping.AuthenticationHandlerauthenticationHandlerprivate static org.apache.commons.logging.Loglogprivate RequestProcessorFactoryFactoryrequestProcessorFactoryFactoryprivate static longserialVersionUIDprivate XmlRpcServletServerserverprivate TypeConverterFactorytypeConverterFactory
-
Constructor Summary
Constructors Constructor Description XmlRpcServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoPost(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse)Creates a new instance ofRequestDatafor the request.AbstractReflectiveHandlerMapping.AuthenticationHandlergetAuthenticationHandler()Returns the servletsAbstractReflectiveHandlerMapping.AuthenticationHandler.RequestProcessorFactoryFactorygetRequestProcessorFactoryFactory()Returns the servletsRequestProcessorFactoryFactory.TypeConverterFactorygetTypeConverterFactory()Returns the servletsTypeConverterFactory.XmlRpcServletServergetXmlRpcServletServer()Returns the servlets instance ofXmlRpcServletServer.private voidhandleInitParameters(javax.servlet.ServletConfig pConfig)voidinit(javax.servlet.ServletConfig pConfig)voidlog(java.lang.String pMessage)voidlog(java.lang.String pMessage, java.lang.Throwable pThrowable)protected PropertyHandlerMappingnewPropertyHandlerMapping(java.net.URL url)Creates a new instance ofPropertyHandlerMappingby loading the property file from the given URL.protected XmlRpcHandlerMappingnewXmlRpcHandlerMapping()Creates a new handler mapping.protected XmlRpcServletServernewXmlRpcServer(javax.servlet.ServletConfig pConfig)Creates a new instance ofXmlRpcServer, which is being used to process the requests.voidsetAuthenticationHandler(AbstractReflectiveHandlerMapping.AuthenticationHandler pHandler)Sets the servletsAbstractReflectiveHandlerMapping.AuthenticationHandler.voidsetRequestProcessorFactoryFactory(RequestProcessorFactoryFactory pFactory)Sets the servletsRequestProcessorFactoryFactory.voidsetTypeConverterFactory(TypeConverterFactory pFactory)Sets the servletsTypeConverterFactory.-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
log
private static final org.apache.commons.logging.Log log
-
server
private XmlRpcServletServer server
-
authenticationHandler
private AbstractReflectiveHandlerMapping.AuthenticationHandler authenticationHandler
-
requestProcessorFactoryFactory
private RequestProcessorFactoryFactory requestProcessorFactoryFactory
-
typeConverterFactory
private TypeConverterFactory typeConverterFactory
-
-
Method Detail
-
getXmlRpcServletServer
public XmlRpcServletServer 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:
initin interfacejavax.servlet.Servlet- Overrides:
initin 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 invokenewXmlRpcServer.- 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 ofPropertyHandlerMappingby loading the property file from the given URL. Called fromnewXmlRpcHandlerMapping().- Throws:
java.io.IOExceptionXmlRpcException
-
doPost
public void doPost(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletExceptionCreates a new instance ofRequestDatafor the request.- Overrides:
doPostin classjavax.servlet.http.HttpServlet- Throws:
java.io.IOExceptionjavax.servlet.ServletException
-
log
public void log(java.lang.String pMessage, java.lang.Throwable pThrowable)- Overrides:
login classjavax.servlet.GenericServlet
-
log
public void log(java.lang.String pMessage)
- Overrides:
login classjavax.servlet.GenericServlet
-
-