org.apache.wicket.settings.def
Class RequestCycleSettings

java.lang.Object
  extended by org.apache.wicket.settings.def.RequestCycleSettings
All Implemented Interfaces:
IRequestCycleSettings

public class RequestCycleSettings
extends java.lang.Object
implements IRequestCycleSettings

Author:
Jonathan Locke, Chris Turner, Eelco Hillenius, Juergen Donnerstag, Johan Compagner, Igor Vaynberg (ivaynberg), Martijn Dashorst, James Carman

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.wicket.settings.IRequestCycleSettings
IRequestCycleSettings.RenderStrategy
 
Constructor Summary
RequestCycleSettings()
           
 
Method Summary
 void addResponseFilter(IResponseFilter responseFilter)
          Adds a response filter to the list.
 boolean getBufferResponse()
           
 boolean getGatherExtendedBrowserInfo()
          Gets whether Wicket should try to get extensive client info by redirecting to a page that polls for client capabilities.
 IRequestCycleSettings.RenderStrategy getRenderStrategy()
          Gets in what way the render part of a request is handled.
 java.util.List<IResponseFilter> getResponseFilters()
           
 java.lang.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.
 IExceptionSettings.UnexpectedExceptionDisplay getUnexpectedExceptionDisplay()
           
 void setBufferResponse(boolean bufferResponse)
           
 void setGatherExtendedBrowserInfo(boolean gatherExtendedBrowserInfo)
          Sets whether Wicket should try to get extensive client info by redirecting to a page that polls for client capabilities.
 void setRenderStrategy(IRequestCycleSettings.RenderStrategy renderStrategy)
          Sets in what way the render part of a request is handled.
 void setResponseRequestEncoding(java.lang.String encoding)
          In order to do proper form parameter decoding it is important that the response and the following request have the same encoding.
 void setTimeout(Duration timeout)
          Sets the time that a request will by default be waiting for the previous request to be handled before giving up.
 void setUnexpectedExceptionDisplay(IExceptionSettings.UnexpectedExceptionDisplay unexpectedExceptionDisplay)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestCycleSettings

public RequestCycleSettings()
Method Detail

addResponseFilter

public void addResponseFilter(IResponseFilter responseFilter)
Description copied from interface: IRequestCycleSettings
Adds a response filter to the list. Filters are evaluated in the order they have been added.

Specified by:
addResponseFilter in interface IRequestCycleSettings
Parameters:
responseFilter - The IResponseFilter that is added
See Also:
org.apache.wicket.settings.IRequestCycleSettings#addResponseFilter(org.apache.wicket.IResponseFilter)

getBufferResponse

public boolean getBufferResponse()
Specified by:
getBufferResponse in interface IRequestCycleSettings
Returns:
True if this application buffers its responses
See Also:
IRequestCycleSettings.getBufferResponse()

getGatherExtendedBrowserInfo

public boolean getGatherExtendedBrowserInfo()
Description copied from interface: IRequestCycleSettings
Gets whether Wicket should try to get extensive client info by redirecting to a page that polls for client capabilities. This method is used by the default implementation of WebRequestCycle#newClientInfo(), so if that method is overridden, there is no guarantee this method will be taken into account.

Specified by:
getGatherExtendedBrowserInfo in interface IRequestCycleSettings
Returns:
Whether to gather extensive client info
See Also:
IRequestCycleSettings.getGatherExtendedBrowserInfo()

getRenderStrategy

public IRequestCycleSettings.RenderStrategy getRenderStrategy()
Description copied from interface: IRequestCycleSettings
Gets in what way the render part of a request is handled.

Specified by:
getRenderStrategy in interface IRequestCycleSettings
Returns:
the render strategy
See Also:
IRequestCycleSettings.getRenderStrategy()

getResponseFilters

public java.util.List<IResponseFilter> getResponseFilters()
Specified by:
getResponseFilters in interface IRequestCycleSettings
Returns:
an unmodifiable list of added response filters, null if none
See Also:
IRequestCycleSettings.getResponseFilters()

getResponseRequestEncoding

public java.lang.String getResponseRequestEncoding()
Description copied from interface: IRequestCycleSettings
In order to do proper form parameter encoding it is important that the response and the subsequent request stipulate a common character encoding. possible form encodings and their problems: wicket now uses multipart/form-data for it's forms.

Specified by:
getResponseRequestEncoding in interface IRequestCycleSettings
Returns:
The request and response encoding
See Also:
IRequestCycleSettings.getResponseRequestEncoding()

getTimeout

public Duration getTimeout()
Description copied from interface: IRequestCycleSettings
Gets the time that a request will by default be waiting for the previous request to be handled before giving up.

Specified by:
getTimeout in interface IRequestCycleSettings
Returns:
The time out
See Also:
IRequestCycleSettings.getTimeout()

getUnexpectedExceptionDisplay

public IExceptionSettings.UnexpectedExceptionDisplay getUnexpectedExceptionDisplay()
Specified by:
getUnexpectedExceptionDisplay in interface IRequestCycleSettings
Returns:
UnexpectedExceptionDisplay
See Also:
IRequestCycleSettings.getUnexpectedExceptionDisplay()

setBufferResponse

public void setBufferResponse(boolean bufferResponse)
Specified by:
setBufferResponse in interface IRequestCycleSettings
Parameters:
bufferResponse - True if this application should buffer responses.
See Also:
IRequestCycleSettings.setBufferResponse(boolean)

setGatherExtendedBrowserInfo

public void setGatherExtendedBrowserInfo(boolean gatherExtendedBrowserInfo)
Description copied from interface: IRequestCycleSettings
Sets whether Wicket should try to get extensive client info by redirecting to a page that polls for client capabilities. This method is used by the default implementation of WebRequestCycle#newClientInfo(), 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.

Specified by:
setGatherExtendedBrowserInfo in interface IRequestCycleSettings
Parameters:
gatherExtendedBrowserInfo - Whether to gather extensive client info
See Also:
IRequestCycleSettings.setGatherExtendedBrowserInfo(boolean)

setRenderStrategy

public void setRenderStrategy(IRequestCycleSettings.RenderStrategy renderStrategy)
Description copied from interface: IRequestCycleSettings
Sets in what way the render part of a request is handled. Basically, there are two different options:

setResponseRequestEncoding

public void setResponseRequestEncoding(java.lang.String encoding)
Description copied from interface: IRequestCycleSettings
In order to do proper form parameter decoding it is important that the response and the following request have the same encoding. see http://www.crazysquirrel.com/computing/general/form-encoding.jspx for additional information. Default encoding: UTF-8

Specified by:
setResponseRequestEncoding in interface IRequestCycleSettings
Parameters:
encoding - The request and response encoding to be used.
See Also:
IRequestCycleSettings.setResponseRequestEncoding(java.lang.String)

setTimeout

public void setTimeout(Duration timeout)
Description copied from interface: IRequestCycleSettings
Sets the time that a request will by default be waiting for the previous request to be handled before giving up.

Specified by:
setTimeout in interface IRequestCycleSettings
See Also:
IRequestCycleSettings.setTimeout(org.apache.wicket.util.time.Duration)

setUnexpectedExceptionDisplay

public void setUnexpectedExceptionDisplay(IExceptionSettings.UnexpectedExceptionDisplay unexpectedExceptionDisplay)
Specified by:
setUnexpectedExceptionDisplay in interface IRequestCycleSettings
See Also:
org.apache.wicket.settings.IRequestCycleSettings#setUnexpectedExceptionDisplay(org.apache.wicket.settings.Settings.UnexpectedExceptionDisplay)


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.