Class HttpServletBase

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected HttpServletBase()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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, java.lang.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)  
      • Methods inherited from class javax.servlet.http.HttpServlet

        doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
      • Methods inherited from class javax.servlet.GenericServlet

        destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HttpServletBase

        protected HttpServletBase()
    • Method Detail

      • doPatch

        public void doPatch​(javax.servlet.http.HttpServletRequest request,
                            javax.servlet.http.HttpServletResponse response)
                     throws javax.servlet.ServletException,
                            java.io.IOException
        Description copied from interface: SupportsPatch
        Perform a HTTP PATCH operation. The PATCH method requests that a set of changes described in the request entity be applied to the resource identified by the Request-URI. The set of changes is represented in a format called a "patch document" identified by a media type. The server MUST apply the entire set of changes atomically and never provide (e.g., in response to a GET during this operation) a partially modified representation. If the entire patch document cannot be successfully applied, then the server MUST NOT apply any of the changes.
        Specified by:
        doPatch in interface SupportsPatch
        Parameters:
        request - an HttpServletRequest object that contains the request the client has made of the servlet
        response - an HttpServletResponse object that contains the response the servlet sends to the client
        Throws:
        javax.servlet.ServletException - if the request for the PATCH could not be handled
        java.io.IOException - if an input or output error is detected when the servlet handles the PATCH request
      • onError

        public boolean onError​(javax.servlet.http.HttpServletRequest request,
                               javax.servlet.http.HttpServletResponse response,
                               int statusCode,
                               java.lang.Throwable cause)
                        throws javax.servlet.ServletException,
                               java.io.IOException
        Description copied from interface: ErrorResponseHandler
        Called when the runtime is about to raise an error condition (i.e report an HTTP status code in the 400-499 range).
        Specified by:
        onError in interface ErrorResponseHandler
        Parameters:
        request - The HttpServletRequest for the current request
        response - The HttpServletResponse for the current response
        statusCode - The HTTP status code to be raised
        cause - The cause of the error condition, may be null
        Returns:
        If this handler generates a response for the error condition this method must return true. 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 invoked
        Throws:
        javax.servlet.ServletException - if the request cannot be handled
        java.io.IOException - if an I/O error occurs while reading the request or writing the response
      • service

        protected void service​(javax.servlet.http.HttpServletRequest req,
                               javax.servlet.http.HttpServletResponse resp)
                        throws javax.servlet.ServletException,
                               java.io.IOException
        Overrides:
        service in class javax.servlet.http.HttpServlet
        Throws:
        javax.servlet.ServletException
        java.io.IOException