org.blojsom.extension.xmlrpc
Class BlojsomXMLRPCServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byorg.blojsom.extension.xmlrpc.BlojsomXMLRPCServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class BlojsomXMLRPCServlet
extends javax.servlet.http.HttpServlet

Blojsom XML-RPC Servlet

This servlet uses the Jakarta XML-RPC Library (http://ws.apache.org/xmlrpc)

Since:
blojsom 3.0
Version:
$Id: BlojsomXMLRPCServlet.java,v 1.5 2007/01/17 02:35:07 czarneckid Exp $
Author:
Mark Lussier, David Czarnecki
See Also:
Serialized Form

Field Summary
protected  org.springframework.context.support.ClassPathXmlApplicationContext _classPathXmlApplicationContext
           
protected  org.apache.commons.logging.Log _logger
           
protected  java.lang.String[] BLOJSOM_CONFIGURATION_FILES
           
protected static java.lang.String XMLRPC_ACCEPTS_ONLY_POSTS_MESSAGE
           
protected static int XMLRPC_DISABLED
           
protected static java.lang.String XMLRPC_DISABLED_MESSAGE
           
 
Constructor Summary
BlojsomXMLRPCServlet()
          Construct a new Blojsom XML-RPC servlet instance
 
Method Summary
protected  org.apache.xmlrpc.XmlRpcServer configureXMLRPCServer(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, java.lang.String blogId)
          Configure the XML-RPC server for the given blog
 void destroy()
          Called when removing the servlet from the servlet container
 void init(javax.servlet.ServletConfig servletConfig)
          Initialize the blojsom XML-RPC servlet
protected  void service(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse)
          Service an XML-RPC request by passing the request to the proper handler
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_logger

protected org.apache.commons.logging.Log _logger

BLOJSOM_CONFIGURATION_FILES

protected java.lang.String[] BLOJSOM_CONFIGURATION_FILES

XMLRPC_DISABLED

protected static final int XMLRPC_DISABLED
See Also:
Constant Field Values

XMLRPC_DISABLED_MESSAGE

protected static final java.lang.String XMLRPC_DISABLED_MESSAGE
See Also:
Constant Field Values

XMLRPC_ACCEPTS_ONLY_POSTS_MESSAGE

protected static final java.lang.String XMLRPC_ACCEPTS_ONLY_POSTS_MESSAGE
See Also:
Constant Field Values

_classPathXmlApplicationContext

protected org.springframework.context.support.ClassPathXmlApplicationContext _classPathXmlApplicationContext
Constructor Detail

BlojsomXMLRPCServlet

public BlojsomXMLRPCServlet()
Construct a new Blojsom XML-RPC servlet instance

Method Detail

init

public void init(javax.servlet.ServletConfig servletConfig)
          throws javax.servlet.ServletException
Initialize the blojsom XML-RPC servlet

Parameters:
servletConfig - Servlet configuration information
Throws:
javax.servlet.ServletException - If there is an error initializing the servlet

configureXMLRPCServer

protected org.apache.xmlrpc.XmlRpcServer configureXMLRPCServer(javax.servlet.http.HttpServletRequest httpServletRequest,
                                                               javax.servlet.http.HttpServletResponse httpServletResponse,
                                                               java.lang.String blogId)
Configure the XML-RPC server for the given blog

Parameters:
httpServletRequest - HttpServletRequest
httpServletResponse - HttpServletResponse
blogId - Blog ID
Returns:
XmlRpcServer instance with handlers configured for the given blog

service

protected void service(javax.servlet.http.HttpServletRequest httpServletRequest,
                       javax.servlet.http.HttpServletResponse httpServletResponse)
                throws javax.servlet.ServletException,
                       java.io.IOException
Service an XML-RPC request by passing the request to the proper handler

Parameters:
httpServletRequest - Request
httpServletResponse - Response
Throws:
javax.servlet.ServletException - If there is an error processing the request
java.io.IOException - If there is an error during I/O

destroy

public void destroy()
Called when removing the servlet from the servlet container