public abstract class HttpServletBase extends javax.servlet.http.HttpServlet implements HasDynamicAuthorization, ErrorResponseHandler, SupportsPatch
HttpServlet implementations, providing
SupportsPatch and HasDynamicAuthorization support.USE_DEFAULT_CONSTRAINTSPATCH| Modifier | Constructor and Description |
|---|---|
protected |
HttpServletBase() |
| Modifier and Type | Method and Description |
|---|---|
void |
doPatch(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Perform a HTTP PATCH operation.
|
AuthorizationConstraint |
getConstraint(javax.servlet.http.HttpServletRequest request)
Determine the
AuthorizationConstraint that applies to a resource. |
boolean |
onError(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
int statusCode,
Throwable cause)
Called when the runtime is about to raise an error condition (i.e report an
HTTP status code in the 400-499 range).
|
protected void |
service(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, servicepublic void doPatch(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
SupportsPatchdoPatch in interface SupportsPatchrequest - an HttpServletRequest object that contains the request the
client has made of the servletresponse - an HttpServletResponse object that contains the response
the servlet sends to the clientjavax.servlet.ServletException - if the request for the PATCH could not be handledIOException - if an input or output error is detected when the servlet handles
the PATCH requestpublic AuthorizationConstraint getConstraint(javax.servlet.http.HttpServletRequest request) throws javax.servlet.ServletException, IOException
HasDynamicAuthorizationAuthorizationConstraint that applies to a resource.getConstraint in interface HasDynamicAuthorizationrequest - an HttpServletRequest object that contains the request the
client has made of the servletAuthorizationConstraint instance if a constraint applies to
the request. null if no constraint applies to the
request. HasDynamicAuthorization.USE_DEFAULT_CONSTRAINTS if
this method cannot determine what constraint applies to the
request, and therefore the runtime's default
AuthorizationConstraint discovery logic will be applied to
the request.javax.servlet.ServletException - if the request for the dynamic privilege could not be handledIOException - if an input or output error is detected when the servlet
determines the AuthorizationConstraintpublic boolean onError(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
int statusCode,
Throwable cause)
throws javax.servlet.ServletException,
IOException
ErrorResponseHandleronError in interface ErrorResponseHandlerrequest - The HttpServletRequest for the current requestresponse - The HttpServletResponse for the current responsestatusCode - The HTTP status code to be raisedcause - The cause of the error condition, may be nulltrue. If this method does not handle
the error condition this method must return false. In
which case the standard runtime's error handling will be invokedjavax.servlet.ServletException - if the request cannot be handledIOException - if an I/O error occurs while reading the request or writing the
responseprotected void service(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
service in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOException