The org.zkoss.zk.ui.util.RequestInterceptor interface

From Documentation
Revision as of 02:28, 6 December 2010 by Char (talk | contribs) (Created page with ' {{ZKConfigurationReferencePageHeader}} <javadoc type="interface">org.zkoss.zk.ui.util.RequestInterceptor</javadoc> is implemented by a listener class that will be used to interc…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


DocumentationZK Configuration Referencezk.xmlThe listener ElementThe org.zkoss.zk.ui.util.RequestInterceptor interface
The org.zkoss.zk.ui.util.RequestInterceptor interface


RequestInterceptor is implemented by a listener class that will be used to intercept each request made to ZK Loader and ZK Update Engine. Once registered, an instance of the specified class is created and shared within the whole application. Then, the request method is invoked, each time a request is received by ZK Loader or ZK Update Engine.

A typical use of this interface is to determine the locale and/or time zone of the request. Please refer to ZK Developer's Reference for the details of Internationalization.

You can register any number of the request interceptors (RequestInterceptor).

Note:

  1. Unlike ExecutionInit and many other listeners, an instance of the registered RequestInterceptor is created at the time of registration, and then it is shared by the whole application. Thus, you have to make sure it can be accessed concurrently.
  2. The request parameters will be parsed with the proper locale and character encoding, after the RequestInterceptor.request(Session, Object, Object) method is called. It is not recommended to call the getParameter or getParameterValues methods (of javax.servlet.ServletRequest) in this method.



Last Update : 2010/12/06

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.