Complete a suspended request.
This method can be called by any thread that has been passed a reference to a suspended request. When a request is completed, the associated response object committed and flushed. The request is not redispatched.
If complete is called before a suspended request is returned to the container (ie the thread that called {@link #suspend()} is stillwithin the filter chain and/or servlet service method), then the complete does not take effect until the call to the filter chain and/or servlet returns to the container. In this case both {@link #isSuspended()} and{@link #isResumed()} return true.
Typically resume() is used after a call to {@link #suspend(ServletResponse)} witha possibly wrapped response. The async handler should use the response provided by {@link #getServletResponse()} to write the response beforecalling {@link #complete()}. If the request was suspended with a call to {@link #suspend()} then no response object will be available via{@link #getServletResponse()}.
Once complete has been called and any thread calling the filter chain and/or servlet chain has returned to the container, the request lifecycle is complete. The container is able to recycle request objects, so it is not valid hold a request or continuation reference after the end of the life cycle.
@see #suspend()
@exception IllegalStateException if the request is not suspended.