org.jets3t.servlets.gatekeeper
Class GatekeeperServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.jets3t.servlets.gatekeeper.GatekeeperServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class GatekeeperServlet
extends javax.servlet.http.HttpServlet

A servlet implementation of an S3 Gatekeeper, as described in the document Gatekeeper Concepts.

This servlet offers an easily configurable and extensible approach, where key steps in the authorization and signature generation process are performed by pluggable interfaces:

These pluggable interfaces are configured in the servlet's configuration file, or if left unconfigured the default JetS3t implementations are used.

For more information about this servlet please refer to: JetS3t Gatekeeper

Author:
James Murty
See Also:
Serialized Form

Constructor Summary
GatekeeperServlet()
           
 
Method Summary
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Sends a simple HTML page in response to GET requests, indicating that the servlet is running.
 void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handles POST requests that contain Gatekeeper messages encoded as POST form properties, and sends a plain text response document containing the Gatekeeper response message encoded as a properties file.
 void init(javax.servlet.ServletConfig servletConfig)
          Initialises the pluggable implementation classes for Authorizer, TransactionIdProvider, and UrlSigner
 
Methods inherited from class javax.servlet.http.HttpServlet
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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GatekeeperServlet

public GatekeeperServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig servletConfig)
          throws javax.servlet.ServletException
Initialises the pluggable implementation classes for Authorizer, TransactionIdProvider, and UrlSigner

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

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws javax.servlet.ServletException,
                  IOException
Sends a simple HTML page in response to GET requests, indicating that the servlet is running.

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

doPost

public void doPost(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws javax.servlet.ServletException,
                   IOException
Handles POST requests that contain Gatekeeper messages encoded as POST form properties, and sends a plain text response document containing the Gatekeeper response message encoded as a properties file.

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