org.rometools.propono.atom.server
Class AtomServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.rometools.propono.atom.server.AtomServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class AtomServlet
extends javax.servlet.http.HttpServlet

Atom Servlet implements Atom protocol by calling an com.sun.syndication.propono.atom.server.AtomHandler implementation. This servlet takes care of parsing incoming XML into ROME Atom Entry objects, passing those to the handler and serializing to the response the entries and feeds returned by the handler.

See Also:
Serialized Form

Field Summary
static String FEED_TYPE
          Get feed type support by Servlet, "atom_1.0"
 
Constructor Summary
AtomServlet()
           
 
Method Summary
protected  void doDelete(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Handle Atom DELETE by calling appropriate handler.
protected  void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Handles an Atom GET by calling handler and writing results to response.
protected  void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Handles an Atom POST by calling handler to identify URI, reading/parsing data, calling handler and writing results to response.
protected  void doPut(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Handles an Atom PUT by calling handler to identify URI, reading/parsing data, calling handler and writing results to response.
static String getContextDirPath()
          Get absolute path to Servlet context directory.
 void init(javax.servlet.ServletConfig config)
          Initialize servlet.
 
Methods inherited from class javax.servlet.http.HttpServlet
doHead, doOptions, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, 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

FEED_TYPE

public static final String FEED_TYPE
Get feed type support by Servlet, "atom_1.0"

See Also:
Constant Field Values
Constructor Detail

AtomServlet

public AtomServlet()
Method Detail

doGet

protected void doGet(javax.servlet.http.HttpServletRequest req,
                     javax.servlet.http.HttpServletResponse res)
              throws javax.servlet.ServletException,
                     IOException
Handles an Atom GET by calling handler and writing results to response.

Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
IOException

doPost

protected void doPost(javax.servlet.http.HttpServletRequest req,
                      javax.servlet.http.HttpServletResponse res)
               throws javax.servlet.ServletException,
                      IOException
Handles an Atom POST by calling handler to identify URI, reading/parsing data, calling handler and writing results to response.

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

doPut

protected void doPut(javax.servlet.http.HttpServletRequest req,
                     javax.servlet.http.HttpServletResponse res)
              throws javax.servlet.ServletException,
                     IOException
Handles an Atom PUT by calling handler to identify URI, reading/parsing data, calling handler and writing results to response.

Overrides:
doPut in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
IOException

doDelete

protected void doDelete(javax.servlet.http.HttpServletRequest req,
                        javax.servlet.http.HttpServletResponse res)
                 throws javax.servlet.ServletException,
                        IOException
Handle Atom DELETE by calling appropriate handler.

Overrides:
doDelete in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
IOException

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Initialize servlet.

Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

getContextDirPath

public static String getContextDirPath()
Get absolute path to Servlet context directory.



Copyright © 2007-2013 ROME Project. All Rights Reserved.