org.jumpmind.symmetric.web
Class SymmetricServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.jumpmind.symmetric.web.AbstractServlet
              extended by org.jumpmind.symmetric.web.SymmetricServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class SymmetricServlet
extends AbstractServlet

The SymmetricServlet manages all of the other servlets. This allows for easier configuration since spring manages the individual servlets. Configured within web.xml

  <servlet>
    <servlet-name>SymmetricServlet</filter-name>
    <servlet-class>
      org.jumpmind.symmetric.web.SymmetricServlet
    </servlet-class>
  </servlet>
 
  <servlet-mapping>
    <servlet-name>SymmetricServlet</servlet-name>
    <url-pattern>*</url-pattern>
  </servlet-mapping>
 

Since:
1.4.0
See Also:
Serialized Form

Constructor Summary
SymmetricServlet()
           
 
Method Summary
 void destroy()
           
protected  AbstractResourceServlet<?> findMatchingServlet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
protected  org.apache.commons.logging.Log getLogger()
           
protected  void handleDelete(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
          Override me to do real work.
protected  void handleGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
          Override me to do real work.
protected  void handleHead(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
          Override me to do real work.
protected  void handleOptions(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
          Override me to do real work.
protected  void handlePost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
          Override me to do real work.
protected  void handlePut(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
          Override me to do real work.
protected  void handleTrace(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
          Override me to do real work.
 void init(javax.servlet.ServletConfig config)
           
 
Methods inherited from class org.jumpmind.symmetric.web.AbstractServlet
createInputStream, createOutputStream, doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getDefaultApplicationContext, getParameter, getParameter, getParameterAsNumber, sendError, sendError
 
Methods inherited from class javax.servlet.http.HttpServlet
getLastModified, service, 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
 

Constructor Detail

SymmetricServlet

public SymmetricServlet()
Method Detail

getLogger

protected org.apache.commons.logging.Log getLogger()
Specified by:
getLogger in class AbstractServlet

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

destroy

public void destroy()
Specified by:
destroy in interface javax.servlet.Servlet
Overrides:
destroy in class javax.servlet.GenericServlet

findMatchingServlet

protected AbstractResourceServlet<?> findMatchingServlet(javax.servlet.http.HttpServletRequest req,
                                                         javax.servlet.http.HttpServletResponse resp)

handleDelete

protected void handleDelete(javax.servlet.http.HttpServletRequest req,
                            javax.servlet.http.HttpServletResponse resp)
                     throws java.lang.Exception
Description copied from class: AbstractServlet
Override me to do real work. Remember that a DELETE should be idempotent. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html.

Overrides:
handleDelete in class AbstractServlet
Throws:
java.io.IOException
javax.servlet.ServletException
java.lang.Exception - everything else that could go wrong!

handleGet

protected void handleGet(javax.servlet.http.HttpServletRequest req,
                         javax.servlet.http.HttpServletResponse resp)
                  throws java.lang.Exception
Description copied from class: AbstractServlet
Override me to do real work. Remember that a GET should be idempotent and safe. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html.

Overrides:
handleGet in class AbstractServlet
Throws:
java.io.IOException
javax.servlet.ServletException
java.lang.Exception - everything else that could go wrong!

handleHead

protected void handleHead(javax.servlet.http.HttpServletRequest req,
                          javax.servlet.http.HttpServletResponse resp)
                   throws java.lang.Exception
Description copied from class: AbstractServlet
Override me to do real work. Remember that a HEAD should be idempotent and safe. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html.

Overrides:
handleHead in class AbstractServlet
Throws:
java.io.IOException
javax.servlet.ServletException
java.lang.Exception - everything else that could go wrong!

handleOptions

protected void handleOptions(javax.servlet.http.HttpServletRequest req,
                             javax.servlet.http.HttpServletResponse resp)
                      throws java.lang.Exception
Description copied from class: AbstractServlet
Override me to do real work. Remember that a OPTIONS should be idempotent and safe. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html.

Overrides:
handleOptions in class AbstractServlet
Throws:
java.io.IOException
javax.servlet.ServletException
java.lang.Exception - everything else that could go wrong!

handlePost

protected void handlePost(javax.servlet.http.HttpServletRequest req,
                          javax.servlet.http.HttpServletResponse resp)
                   throws java.lang.Exception
Description copied from class: AbstractServlet
Override me to do real work. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html.

Overrides:
handlePost in class AbstractServlet
Throws:
java.io.IOException
javax.servlet.ServletException
java.lang.Exception - everything else that could go wrong!

handlePut

protected void handlePut(javax.servlet.http.HttpServletRequest req,
                         javax.servlet.http.HttpServletResponse resp)
                  throws java.lang.Exception
Description copied from class: AbstractServlet
Override me to do real work. Remember that a PUT should be idempotent. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html.

Overrides:
handlePut in class AbstractServlet
Throws:
java.io.IOException
javax.servlet.ServletException
java.lang.Exception - everything else that could go wrong!

handleTrace

protected void handleTrace(javax.servlet.http.HttpServletRequest req,
                           javax.servlet.http.HttpServletResponse resp)
                    throws java.lang.Exception
Description copied from class: AbstractServlet
Override me to do real work. Remember that a TRACE should be idempotent. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html.

Overrides:
handleTrace in class AbstractServlet
Throws:
java.io.IOException
javax.servlet.ServletException
java.lang.Exception - everything else that could go wrong!


Copyright © 2007-2008. All Rights Reserved.