smbdav
Class DefaultAuthErrorHandler
java.lang.Object
smbdav.DefaultAuthErrorHandler
- All Implemented Interfaces:
- ErrorHandler
- public class DefaultAuthErrorHandler
- extends java.lang.Object
- implements ErrorHandler
This is the default Davenport ErrorHandler for authentication
exceptions. This class processes authentication errors according to the
errorHandler.authenticationFailureBehavior and
errorHandler.sendError settings.
- Author:
- Eric Glass
|
Method Summary |
void |
destroy()
Called by the Davenport servlet to indicate that the handler is being
taken out of service. |
void |
handle(java.lang.Throwable throwable,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Called by the Davenport servlet to allow the error handler to process
an error. |
void |
init(javax.servlet.ServletConfig config)
Called by the Davenport servlet to indicate that the handler is being
placed into service. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AUTHENTICATE_BEHAVIOR
public static final int AUTHENTICATE_BEHAVIOR
- See Also:
- Constant Field Values
FORBIDDEN_BEHAVIOR
public static final int FORBIDDEN_BEHAVIOR
- See Also:
- Constant Field Values
UNAUTHORIZED_BEHAVIOR
public static final int UNAUTHORIZED_BEHAVIOR
- See Also:
- Constant Field Values
NOT_FOUND_BEHAVIOR
public static final int NOT_FOUND_BEHAVIOR
- See Also:
- Constant Field Values
IGNORE_BEHAVIOR
public static final int IGNORE_BEHAVIOR
- See Also:
- Constant Field Values
DefaultAuthErrorHandler
public DefaultAuthErrorHandler()
init
public void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
- Description copied from interface:
ErrorHandler
- Called by the Davenport servlet to indicate that the handler is being
placed into service. Semantics are identical to the
Servlet
init method; the method is called exactly once after
instantiation.
- Specified by:
init in interface ErrorHandler
- Parameters:
config - a ServletConfig object containing
the Davenport servlet's configuration and initialization parameters.
- Throws:
javax.servlet.ServletException - If an error occurs during initialization.
destroy
public void destroy()
- Description copied from interface:
ErrorHandler
- Called by the Davenport servlet to indicate that the handler is being
taken out of service. Semantics are identical to the
Servlet destroy method. This method
gives the handler an opportunity to clean up any resources that
are being held. After this method has been called, the
handle method will not be invoked again.
- Specified by:
destroy in interface ErrorHandler
handle
public void handle(java.lang.Throwable throwable,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Throwable
- Called by the Davenport servlet to allow the error handler to process
an error. This implementation processes authentication errors
according to the configured settings. All other errors are thrown
back to the caller for further processing.
- Specified by:
handle in interface ErrorHandler
- Parameters:
throwable - The error that is being presented for handling.request - The servlet request object.response - The servlet response object.
- Throws:
java.lang.Throwable - The presented error, if it cannot be processed
by this handler.
Copyright © 2004 Eric Glass