/** * Recycle the input buffer. This should be called when closing the * connection. */ public void recycle() { // Recycle Request object request.recycle(); inputStream = null; lastValid = 0; pos = 0; lastActiveFilter = -1; parsingHeader = true; swallowInput = true; }
/** * Recycle the input buffer. This should be called when closing the * connection. */ public void recycle() { // Recycle Request object request.recycle(); inputStream = null; lastValid = 0; pos = 0; lastActiveFilter = -1; parsingHeader = true; swallowInput = true; }
public void afterService(Request req, Response res) throws Exception { // Recycle the wrapper request and response req.recycle(); res.recycle(); }
/** * Recycle the input buffer. This should be called when closing the * connection. */ public void recycle() { // Recycle Request object request.recycle(); // Recycle filters for (int i = 0; i <= lastActiveFilter; i++) { activeFilters[i].recycle(); } inputStream = null; lastValid = 0; pos = 0; lastActiveFilter = -1; parsingHeader = true; swallowInput = true; isSwallowingInput = false; swallowedBytesCounter = 0; }
request.recycle();
public void afterService(Request req, Response res) throws Exception { if (res.getStatus() == 404 && !commitErrorResponse){ return; } try{ req.action( ActionCode.ACTION_POST_REQUEST , null); }catch (Throwable t) { logger.log(Level.WARNING,"afterService()",t); } res.finish(); req.recycle(); res.recycle(); }
/** * Finish the {@link Response} and recycle the {@link Request} and the * {@link Response}. If the {@link StaticResourcesAdapter#commitErrorResponse} * is set to false, this method does nothing. * * @param req {@link Request} * @param res {@link Response} * @throws java.lang.Exception */ public void afterService(Request req, Response res) throws Exception { if (res.getStatus() == 404 && !commitErrorResponse){ return; } try{ req.action( ActionCode.ACTION_POST_REQUEST , null); }catch (Throwable t) { logger.log(Level.WARNING,"afterService unexpected exception: ",t); } res.finish(); req.recycle(); res.recycle(); }