public class RequestCycleSettings extends Object
bufferResponse (defaults to true) - True if the application should buffer responses. This does require some additional memory, but helps keep exception displays accurate because the whole rendering process completes before the page is sent to the user, thus aRequestCycleSettingsing the possibility of a partially rendered page.
renderStrategy - Sets in what way the render part of a request is handled. Basically, there are two different options:
More documentation is available about each setting in the setter method for the property.
Modifier and Type | Class and Description |
---|---|
static class |
RequestCycleSettings.RenderStrategy
Enum type for different render strategies
|
Constructor and Description |
---|
RequestCycleSettings() |
Modifier and Type | Method and Description |
---|---|
RequestCycleSettings |
addResponseFilter(IResponseFilter responseFilter)
Adds a response filter to the list.
|
boolean |
getBufferResponse()
Decides whether to buffer the response's headers until the end of the request processing.
|
int |
getExceptionRetryCount() |
boolean |
getGatherExtendedBrowserInfo()
Gets whether Wicket should try to get extensive client info by redirecting to
a page that polls for client capabilities . |
RequestCycleSettings.RenderStrategy |
getRenderStrategy()
Gets in what way the render part of a request is handled.
|
List<IResponseFilter> |
getResponseFilters() |
String |
getResponseRequestEncoding()
In order to do proper form parameter encoding it is important that the response and the
subsequent request stipulate a common character encoding.
|
Duration |
getTimeout()
Gets the time that a request will by default be waiting for the previous request to be
handled before giving up.
|
RequestCycleSettings |
setBufferResponse(boolean bufferResponse)
Sets a flag whether the application should buffer the response's headers until the end
of the request processing.
|
RequestCycleSettings |
setExceptionRetryCount(int retries)
Sets how many attempts Wicket will make to render the exception request handler before
giving up.
|
RequestCycleSettings |
setGatherExtendedBrowserInfo(boolean gatherExtendedBrowserInfo)
Sets whether Wicket should try to get extensive client info by redirecting to
a page that polls for client capabilities . |
RequestCycleSettings |
setRenderStrategy(RequestCycleSettings.RenderStrategy renderStrategy)
Sets in what way the render part of a request is handled.
|
RequestCycleSettings |
setResponseRequestEncoding(String encoding)
In order to do proper form parameter decoding it is important that the response and the
following request have the same encoding.
|
RequestCycleSettings |
setTimeout(Duration timeout)
Sets the time that a request will by default be waiting for the previous request to be
handled before giving up.
|
public RequestCycleSettings addResponseFilter(IResponseFilter responseFilter)
responseFilter
- The IResponseFilter
that is addedthis
object for chainingpublic boolean getBufferResponse()
Component.setResponsePage(org.apache.wicket.request.component.IRequestablePage)
or
ResetResponseException
true
if the application should buffer the response's headers.public boolean getGatherExtendedBrowserInfo()
a page that polls for client capabilities
. This method is used by the
default implementation of Session.getClientInfo()
, so if that method is
overridden, there is no guarantee this method will be taken into account.public RequestCycleSettings.RenderStrategy getRenderStrategy()
public List<IResponseFilter> getResponseFilters()
public String getResponseRequestEncoding()
public Duration getTimeout()
public RequestCycleSettings setBufferResponse(boolean bufferResponse)
Component.setResponsePage(org.apache.wicket.request.component.IRequestablePage)
or ResetResponseException
bufferResponse
- true
if the application should buffer response's headers.this
object for chainingpublic RequestCycleSettings setGatherExtendedBrowserInfo(boolean gatherExtendedBrowserInfo)
a page that polls for client capabilities
. This method is used by the
default implementation of Session.getClientInfo()
, so if that method is
overridden, there is no guarantee this method will be taken into account.
WARNING: though this facility should work transparently in most cases, it
is recommended that you trigger the roundtrip to get the browser info somewhere where it
hurts the least. The roundtrip will be triggered the first time you call
Session.getClientInfo()
for a session, and after the roundtrip a new request with the
same info (url, post parameters) is handled. So rather than calling this in the middle of an
implementation of a form submit method, which would result in the code of that method before
the call to Session.getClientInfo()
to be executed twice, you best call
Session.getClientInfo()
e.g. in a page constructor or somewhere else where you didn't
do a lot of processing first.
gatherExtendedBrowserInfo
- Whether to gather extensive client infothis
object for chainingpublic RequestCycleSettings setRenderStrategy(RequestCycleSettings.RenderStrategy renderStrategy)
renderStrategy
- the render strategy that should be used by default.this
object for chainingpublic RequestCycleSettings setResponseRequestEncoding(String encoding)
encoding
- The request and response encoding to be used.this
object for chainingpublic RequestCycleSettings setTimeout(Duration timeout)
timeout
- this
object for chainingpublic RequestCycleSettings setExceptionRetryCount(int retries)
retries
- the number of attemptsthis
object for chainingpublic int getExceptionRetryCount()
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.