/** * @see org.apache.wicket.jmx.RequestCycleSettingsMBean#getBufferResponse() */ @Override public boolean getBufferResponse() { return application.getRequestCycleSettings().getBufferResponse(); }
/** * Called to handle a {@link java.lang.RuntimeException} that might be * thrown during detaching phase. * * @param exception */ private void handleDetachException(RuntimeException exception) { boolean isBufferedResponse = true; if (Application.exists()) { isBufferedResponse = Application.get().getRequestCycleSettings().getBufferResponse(); } //if application is using a buffered response strategy, //then we display exception to user. if (isBufferedResponse) { throw exception; } else { log.error("Error detaching RequestCycle", exception); } }
/** * Called to handle a {@link java.lang.RuntimeException} that might be * thrown during detaching phase. * * @param exception */ private void handleDetachException(RuntimeException exception) { boolean isBufferedResponse = true; if (Application.exists()) { isBufferedResponse = Application.get().getRequestCycleSettings().getBufferResponse(); } //if application is using a buffered response strategy, //then we display exception to user. if (isBufferedResponse) { throw exception; } else { log.error("Error detaching RequestCycle", exception); } }
/** * Pre- and post- configures the {@link WebResponse} returned from * {@link #newWebResponse(WebRequest, HttpServletResponse)} * * @param webRequest * the {@link WebRequest} that will handle the current HTTP Servlet request * @param httpServletResponse * the current HTTP Servlet response * @return the configured WebResponse object */ WebResponse createWebResponse(final WebRequest webRequest, final HttpServletResponse httpServletResponse) { WebResponse webResponse = newWebResponse(webRequest, httpServletResponse); boolean shouldBufferResponse = getRequestCycleSettings().getBufferResponse(); return shouldBufferResponse ? new HeaderBufferingWebResponse(webResponse) : webResponse; }
/** * Pre- and post- configures the {@link WebResponse} returned from * {@link #newWebResponse(WebRequest, HttpServletResponse)} * * @param webRequest * the {@link WebRequest} that will handle the current HTTP Servlet request * @param httpServletResponse * the current HTTP Servlet response * @return the configured WebResponse object */ WebResponse createWebResponse(final WebRequest webRequest, final HttpServletResponse httpServletResponse) { WebResponse webResponse = newWebResponse(webRequest, httpServletResponse); boolean shouldBufferResponse = getRequestCycleSettings().getBufferResponse(); return shouldBufferResponse ? new HeaderBufferingWebResponse(webResponse) : webResponse; }
/** * Constructor. * * @param id * Component id * @param application * The application to view */ public ApplicationView(final String id, final Application application) { super(id); // Basic attributes add(new Label("name", application.getName())); add(new Label("componentUseCheck", "" + application.getDebugSettings().getComponentUseCheck())); add(new Label("compressWhitespace", "" + application.getMarkupSettings().getCompressWhitespace())); add(new Label("stripComments", "" + application.getMarkupSettings().getStripComments())); add(new Label("stripWicketTags", "" + application.getMarkupSettings().getStripWicketTags())); add(new Label("bufferResponse", "" + application.getRequestCycleSettings().getBufferResponse())); add(new Label("resourcePollFrequency", "" + application.getResourceSettings().getResourcePollFrequency())); add(new Label("versionPages", "" + application.getPageSettings().getVersionPagesByDefault())); } }
/** * Constructor. * * @param id * Component id * @param application * The application to view */ public ApplicationView(final String id, final Application application) { super(id); // Basic attributes add(new Label("name", application.getName())); add(new Label("componentUseCheck", "" + application.getDebugSettings().getComponentUseCheck())); add(new Label("compressWhitespace", "" + application.getMarkupSettings().getCompressWhitespace())); add(new Label("stripComments", "" + application.getMarkupSettings().getStripComments())); add(new Label("stripWicketTags", "" + application.getMarkupSettings().getStripWicketTags())); add(new Label("bufferResponse", "" + application.getRequestCycleSettings().getBufferResponse())); add(new Label("resourcePollFrequency", "" + application.getResourceSettings().getResourcePollFrequency())); add(new Label("versionPages", "" + application.getPageSettings().getVersionPagesByDefault())); } }