com.qindesign.servlet
Class ShutdownServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.qindesign.servlet.AuthenticatedHttpServlet
com.qindesign.servlet.ShutdownServlet
- All Implemented Interfaces:
- com.qindesign.snap.http.Authenticator.Authorizer, Servlet, ServletConfig
public class ShutdownServlet
- extends AuthenticatedHttpServlet
Example servlet that provides a link to the shutdown URL. This uses a
simple authentication scheme to grant access.
- Version:
- 1.0.4
- Author:
- Shawn Silverman
| Methods inherited from class com.qindesign.servlet.AuthenticatedHttpServlet |
authorizedService, doUnauthorizedDelete, doUnauthorizedGet, doUnauthorizedHead, doUnauthorizedOptions, doUnauthorizedPost, doUnauthorizedPut, doUnauthorizedTrace, getDefaultScheme, getProperty, isAuthExpired, isSchemeAcceptable, service, service, unauthorizedService |
| Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
ShutdownServlet
public ShutdownServlet()
getRealm
public String getRealm(HttpServletRequest req)
- The realm is "Shutdown".
- Specified by:
getRealm in interface com.qindesign.snap.http.Authenticator.Authorizer- Specified by:
getRealm in class AuthenticatedHttpServlet
- Parameters:
req - the HTTP request object
- Returns:
- the realm "Shutdown".
- See Also:
Authenticator.Authorizer
getPassword
public String getPassword(String realm,
String user)
- Gets the password for the specified user in the given realm. This
checks the "auth" initialization parameter for a username/password
pair. The format is username:password.
- Specified by:
getPassword in interface com.qindesign.snap.http.Authenticator.Authorizer- Specified by:
getPassword in class AuthenticatedHttpServlet
- Parameters:
realm - the protection space, a case-insensitive valueuser - the user
- Returns:
- the password for the specified user in the given realm.
doGet
protected void doGet(HttpServletRequest req,
HttpServletResponse resp)
throws ServletException,
IOException
- Process a GET request.
- Overrides:
doGet in class HttpServlet
- Throws:
ServletException
IOException
© 2001-2007 Shawn Silverman